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

Make a subdirectory of the temporary directory per-runset #569

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

WardBrian
Copy link
Member

Submission Checklist

  • Run unit tests
  • Declare copyright holder and open-source license: see below

Summary

Closes #568. When no output directory is specified, each runset creates its own subfolder in the _TMPDIR directory to avoid name clashes. This has also affected fbprophet.

When the output directory is specified, name clobbering will still occur - we assume the user knows what is going on in that case.

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@WardBrian WardBrian added the bug Something isn't working label Jun 14, 2022
@WardBrian
Copy link
Member Author

I should note that this technically makes the RunSet object truly thread-safe when used with the default directory, since tempfile.mkdtemp notes

There are no race conditions in the directory’s creation. The directory is readable, writable, and searchable only by the creating user ID.

@ahartikainen
Copy link
Contributor

Why the filenames can't have microsecond accuracy?

@ahartikainen
Copy link
Contributor

Or uuid4 value per run?

@WardBrian
Copy link
Member Author

They could (and the user could already specify that) but that's not really thread safe, since it's still possible (though vanishingly less common) to get two file sets with the same time. This approach is nice because it keeps the files from each run in a parallel folder, if for some reason you ever needed to navigate to it

@WardBrian WardBrian merged commit f5e9e86 into develop Jun 14, 2022
@ahartikainen
Copy link
Contributor

Those are solid answers.

@WardBrian WardBrian deleted the fix/568-temp-subdir branch June 14, 2022 18:08
@WardBrian WardBrian mentioned this pull request Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected determinancy from rng functions across model runs
2 participants