-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exp save: Reintroduce implementation based on executor
/queue
.
#9165
Conversation
494c7a4
to
b397158
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #9165 +/- ##
==========================================
- Coverage 92.86% 92.85% -0.02%
==========================================
Files 458 458
Lines 37027 37044 +17
Branches 5350 5344 -6
==========================================
+ Hits 34386 34398 +12
- Misses 2114 2118 +4
- Partials 527 528 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
b397158
to
dabe361
Compare
@dberenbaum I have done some QA and updated the tests but might have missed some discrepancies with |
Can't remember if it's a new issue or whether this should be a separate follow-up, but an untracked
I also can't remember whether
|
executor
/queue
.executor
/queue
.
21d7f17
to
cad6bec
Compare
executor
/queue
.executor
/queue
.
cad6bec
to
1f5f411
Compare
tests/func/experiments/test_save.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know why some tests in this file randomly fail (mostly on windows , few times on macos) when running the full test suite but pass when running the file in isolation:
Failure: https://github.com/iterative/dvc/actions/runs/4498532766/jobs/7915264864#step:6:934
Passing on isolation: https://github.com/iterative/dvc/actions/runs/4499133901/jobs/7916623248
I updated the tests to use a "from scratch" setup and only tmp_dir, dvc, scm
fixtures.
dvc/repo/experiments/save.py
Outdated
save_result = executor.save( | ||
executor.info, force=force, include_untracked=include_untracked | ||
) | ||
result = queue.collect_executor(repo.experiments, executor, save_result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save_result = executor.save( | |
executor.info, force=force, include_untracked=include_untracked | |
) | |
result = queue.collect_executor(repo.experiments, executor, save_result) | |
try: | |
save_result = executor.save( | |
executor.info, force=force, include_untracked=include_untracked | |
) | |
result = queue.collect_executor(repo.experiments, executor, save_result) | |
finally: | |
executor.cleanup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to cleanup the executor here since it has it's own scm instance that isn't getting closed.
Not sure whether or not this is the cause of your flaky tests, but it's possible some git object isn't being written/flushed before your test tries to read it afterwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appeared to be the cause. Thanks!
aa987ca
to
3c36693
Compare
3c36693
to
b7bbde5
Compare
Closes #9058 . Ensures behavior of `_stash_exp` in `exp run` is matched in `exp save` without duplicating logic. The simpler implementation ended up being worse for maintenance when wanting to make `exp run` and `exp save` behavior in sync.
b7bbde5
to
c5b673d
Compare
Closes #9058
Ensures behavior of
_stash_exp
inexp run
is matched inexp save
without duplicating logic.The simpler implementation ended up being worse for keeping
exp run
andexp save
behavior in sync.