Comments (2)
Indeed your solution works.
I initially tried something similar but since I put register_new_resolver()
inside my if __name__ == '__main__':
block it wasn't executed, which made me (wrongly) think that when using the dora
command, only the piece of code inside hydra_main
was executed.
Maybe mentioning this point in the README could be helpful, insisting on the fact that the register_new_resolver
should be outside of the if __name__ == '__main__'
, which is a bit unusual.
Thanks a lot!
from dora.
I'm wondering why not do it outside of my_hydra_main
? it doesn't seem like you are using any of the Hydra API to register new resolver, so you could have something like
def register_my_resolver():
for name, resolver in extra_resolvers.items():
OmegaConf.register_new_resolver(name, resolver)
@hydra_main(...)
def main(cfg):
...
register_my_resolver()
Note that the position of the call to register_my_resolver()
doesn't actually matter, and could be before main()
. I would tend to favor this option as this makes it clear from the code, that the registration of the resolvers will leak to any other call to OmegaConf, and I would tend to think a PR is not needed for that use case. Potentially an update to the README to show this pattern.
Regarding question 1., get_xp()
needs to resolve the config because this is how the signature is actually derived. It will resolve the full config, compare it with the base config and build a delta. The hash of the delta is then the signature.
from dora.
Related Issues (20)
- Cannot import name 'hydra_main' from 'dora' on Colab or Kaggle environment HOT 2
- Can I train on multiple machines? HOT 2
- Slurm Configuration HOT 1
- World size by dora_distrib.world_size() is equal to 1 when I have two GPU's HOT 2
- Run a grid experiment for the first time HOT 1
- Why only the log file of rank > 0 is created? HOT 2
- How to run with torchrun? HOT 3
- Can not work on multi machines with multi gpus HOT 2
- Initializing Dora xp/using Dora HOT 1
- Can we train with dora on multiple machines without SLURM? HOT 2
- Is there any way to use the Debugger of VSCode while using "dora run"? HOT 3
- Cannot install due to requirement of "sklearn" HOT 1
- How to add the --export=ALL option to srun? HOT 2
- No training when using 2 nodes and torchrun HOT 6
- [Feature request] Export grid tree table to LaTeX/csv HOT 3
- No stop command? HOT 2
- Now I want to debug dora,Is dora parsing from the train.py file?
- Python Debugger and dora HOT 1
- Deleting History of a Cancelled Experiment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dora.