Skip to content
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

Fix issue when running on batch with local metadata #902

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

romain-intel
Copy link
Contributor

Artifacts were persisted after the metadata was saved to S3 to be
repatriated locally which caused it to completely miss.

This addresses this issue (fixes #878) and also addresses another issue
in load_metadata when loading non existent metadata.

Artifacts were persisted *after* the metadata was saved to S3 to be
repatriated locally which caused it to completely miss.

This addresses this issue (fixes #878) and also addresses another issue
in load_metadata when loading non existent metadata.
self, contents, allow_overwrite=True, add_attempt=True
):
"""
Method identical to save_metadata BUT BYPASSES THE CHECK ON DONE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should .save_metadata() call this method then? Or maybe just remove @only_if_done decorator? I'm not 100% sure what scenario is supposed to prevent though, or is it just a sanity check?

Also consider adding a comment explaining what exactly is the "danger" here, I understand that it bypasses that check but what's the actual consequence of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put some additional comment. Given the length of the method, I rather keep them separate. It is also a little nicer not to call a _dangerous method inside a non dangerous one :).

metaflow/datastore/task_datastore.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@savingoyal savingoyal left a comment

Choose a reason for hiding this comment

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

LGTM! Tried it on AWS Batch and Kubernetes

@savingoyal savingoyal merged commit bf3aae3 into master Jan 18, 2022
@savingoyal savingoyal deleted the fix-metadata-sync branch January 18, 2022 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError getting results of Batch runs in 2.4.0+
3 participants