Skip to content

run-cache: skip unhashable stages #5185

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

Merged
merged 1 commit into from
Dec 31, 2020
Merged

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Dec 31, 2020

Fixes #5182

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

cache = StageCache(repo)
stage = Stage(repo, always_changed=True)
cache = StageCache(dvc)
stage = create_stage(Stage, path="stage.dvc", repo=dvc, **kwargs)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too lazy to mock this out perfectly (as in many other tests). We need some nice factory for stages to use in tests πŸ™

@@ -167,7 +172,7 @@ def save(self, stage):
self.tree.move(PathInfo(tmp), path)

def restore(self, stage, run_cache=True, pull=False):
if stage.is_callback or stage.always_changed:
if not _can_hash(stage):
Copy link
Contributor Author

@efiop efiop Dec 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better approach here would be to try to checkout/pull anything that is up-to-date(e.g. dvc added files and always_changed stages, but that needs to be done on a higher level as well as here. Will be resolved in #4742

@efiop efiop changed the title run-cache: skip unhashable stages [WIP] run-cache: skip unhashable stages Dec 31, 2020
@efiop efiop changed the title [WIP] run-cache: skip unhashable stages run-cache: skip unhashable stages Dec 31, 2020
@efiop efiop merged commit 9486337 into iterative:master Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run-cache: restore does not check if stage has outs or not
1 participant