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
Use stored configuration in another script #143
Comments
Yeah you can define a macro/constant for the agent and the environment and the use them as needed. Ex:
|
Thank you for the reply. But if I run train.py with this configuration setup, it does not recognise eval function which results in an error. If I import eval function in train.py, it solves the issue, but I think this is not an ideal solution to this problem. Can you give an advice to this? That would be so helpful. Thank you. |
You should split the gin configuration in different files, one with the common parts, ex.. agent and env and then include it in the train.gin and the eval.gin files.
|
Thank you so much, this was very helpful :) |
Hi, is it possible to store some of the configurations into a file and load them into another file?
For example, I have 'train.py' and a configuration file for this script.
gin:
I have another script called 'eval.py', and I need to reload an agent and an environment.
However, two functions have different names, I could not use the configuration file.
I tried to use '@gin.configurable('main')' to both functions, but since train takes additional arguments that is not needed in eval function, it did not work.
I also tried to create a function such as get_agent and get_environment which simply takes an argument and returns it, but this does not seem to be a good design choice.
Do you have any suggestion to resolve this issue?
Thank you.
The text was updated successfully, but these errors were encountered: