Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

train_from_recipe.py 572 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  1. """
  2. Example code for running SuperGradient's recipes.
  3. General use: python train_from_recipe.py --config-name="DESIRED_RECIPE".
  4. For recipe's specific instructions and details refer to the recipe's configuration file in the recipes directory.
  5. """
  6. import super_gradients
  7. from omegaconf import DictConfig
  8. import hydra
  9. import pkg_resources
  10. from trainer import Trainer
  11. @hydra.main(config_path=pkg_resources.resource_filename("recipes", ""))
  12. def main(cfg: DictConfig) -> None:
  13. Trainer.train(cfg)
  14. if __name__ == "__main__":
  15. super_gradients.init_trainer()
  16. main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...