Repository navigation
Conversation
Experiment.reset() rebuilds the job list by calling self.add() for every saved job, but it only forwarded the task, executor, name and tail_logs. The dependencies stored on each Job/JobGroup were dropped, so a relaunched experiment treated every job as independent and launched dependent jobs in parallel instead of after the jobs they depend on. Pass each job's dependencies through to add(). Jobs are re-added in their saved order, so every dependency id is already present when it is checked. Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Experiment.reset()rebuilds the experiment by re-adding each saved job withself.add(...), passing the task/executor,nameandtail_logsbut notdependencies. The reloadedJob/JobGroupobjects still hold their dependencies (they're serialized and restored correctly), but every rebuilt job ends up withdependencies == [].So relaunching a finished experiment with dependent jobs (e.g. train → eval,
Experiment.from_id(...).reset().run()) flattens the dependency graph to one level and launches every job at once, with no error or warning.Fix
Pass
dependencies=job.dependenciesin bothreset()branches (single jobs and job groups). Jobs are re-added in their saved order, so each dependency already exists whenadd()validates it.Tests
test_reset_preserves_job_dependenciesintest/run/test_experiment.pycovers a single job and a job group that depend on another job. It fails onmain(assert [] == ['job1']) and passes with the fix;test/run/test_experiment.pyandtest/run/test_job.pypass (129).