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

File storage experiment fix #102

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rajatvd
Copy link

@rajatvd rajatvd commented Mar 3, 2024

  • info.json is not always created by FileStorageObserver, so load it only if the file exists in run_dir.
  • Previously, artifacts were opened without being closed when loading artifacts. Now, just pass the path to the Artifact constructor instead of opening it.

Copy link
Owner

@JarnoRFB JarnoRFB left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

incense/experiment.py Outdated Show resolved Hide resolved
name = artifact_path.name
artifacts[name] = Artifact(name, artifact_file)
artifacts[name] = Artifact(name, artifact_path)
Copy link
Owner

Choose a reason for hiding this comment

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

Actually surprised that this works. However, the Artifact type expects something file like to keep it compatible with the MongoDB variant. For a change like this we would have to define a general protocol to abstract over local and MongoDB files.

Copy link
Author

Choose a reason for hiding this comment

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

That is a good point. The main reason for this change was that the previous version opened artifact files without closing them, which lead to errors when loading a large number of experiments at once.

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.

2 participants