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

How to use bash code to tune hyperparameters? #56

Closed
yuqinie98 opened this issue Jun 20, 2023 · 3 comments
Closed

How to use bash code to tune hyperparameters? #56

yuqinie98 opened this issue Jun 20, 2023 · 3 comments

Comments

@yuqinie98
Copy link

Hello, congrats for the great work! I was trying to do hyperparameter tuning of my model, using a sh file to pass the arguments into the py file (using argparse).

However, if I have a script, say "run.sh", it will run the "example/run.py", and then "example/run.py" will try to get the hyperparameters in "examples/Triformer/Triformer_ETTh1.py".

Now I want to pass the hyperparameters from "run.sh" to "examples/Triformer/Triformer_ETTh1.py". But it seems I can only pass arguments to the "example/run.py". Since the parameters are stored in "examples/Triformer/Triformer_ETTh1.py", which is the file I want to modify, could you kindly suggest on that? Thanks very much for your time!

@zezhishao
Copy link
Collaborator

zezhishao commented Jun 20, 2023

You can copy several your config files, and use different hyper-parameters.
For example, Triformer _etth1_lr_0001.py and Triformer_etth1_lr_0002.py.

@yuqinie98
Copy link
Author

yuqinie98 commented Jun 21, 2023

I see, that is indeed a clever way to do it. I will try with it. Thanks so much!

@zezhishao
Copy link
Collaborator

You're welcome! If you have any other questions or suggestions, feel free to create a new issue.

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

No branches or pull requests

2 participants