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

Add option to not create .hydra in output directory #324

Closed
omry opened this issue Dec 13, 2019 · 6 comments · Fixed by #616
Closed

Add option to not create .hydra in output directory #324

omry opened this issue Dec 13, 2019 · 6 comments · Fixed by #616
Labels
enhancement Enhanvement request good first issue Good for newcomers
Milestone

Comments

@omry
Copy link
Collaborator

omry commented Dec 13, 2019

In some cases users are not interested in the generation of config.yaml, hydra.yaml etc.
add an option to opt out.

@omry omry added the enhancement Enhanvement request label Dec 13, 2019
@omry omry added this to the 0.12.0 milestone Dec 13, 2019
@omry omry added the good first issue Good for newcomers label Jan 1, 2020
@exic
Copy link

exic commented Jan 6, 2020

I have my applications in docker containers and don't need that either, also I have to say that the whole output directory feature surprised me (especially changing my working directory), since I was only expecting it to do configuration things. So I'd vote to actually make it opt in. :-)

@omry
Copy link
Collaborator Author

omry commented Jan 6, 2020

Hi Jonas,
The working directory feature integrates with other core features like multi-run (where you run your app multiple time with a different configuration with a single command).
I thought hard about this, and while I understand it's surprising it's here to stay :).

Working directory can be fully customized, see this.
You can change it to . or to /tmp for example.

@exic
Copy link

exic commented Jan 7, 2020

Yeah I already changed it to . to keep my app's behavior, /tmp would be better to avoid "pollution" of the main dir, but then I'd probably have to change back to the get_original_cwd directory or change all the paths in my program, right?

@omry
Copy link
Collaborator Author

omry commented May 28, 2020

I missed your question, sorry.
See this for ways to access files in the original working directory.

@benjamindkilleen
Copy link

The automatic output dirs is the main reason I use this project, and I especially like the option to set the output_dir to /tmp, for debugging purposes (which I didn't think of until seeing this thread). There are many times I know something will fail, but I want to see it's output anyway. This obviously results in many useless output dirs, requiring cleanup.

I could imagine a --debug or --tmp option for hydra that sets this option would be helpful, for people who miss this issue as well as just ease of use.

@omry
Copy link
Collaborator Author

omry commented Sep 26, 2020

Thanks for your feedback @benjamindkilleen.
This capability is not going anywhere. However - in some scenarios automatically changing the cwd to the output directory is
getting in the way.
I am planning to make things more configurable in that area and in the long term maybe even change the default behavior to not chdir into the output directory (while still allowing it to be easily enabled).

See #910 for general plan in this area (which may yet change, I am still thinking about all this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhanvement request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants