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

#849 Feature/sg src add examples to init

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-src-add_examples_to_init
52 changed files with 293 additions and 281 deletions
  1. 3
    3
      README.md
  2. 1
    1
      docs/welcome.html
  3. 2
    2
      documentation/source/Checkpoints.md
  4. 1
    1
      documentation/source/ObjectDetection.md
  5. 1
    1
      documentation/source/PoseEstimation.md
  6. 1
    1
      documentation/source/QuickstartBasicToolkit.md
  7. 7
    8
      documentation/source/configuration_files.md
  8. 0
    4
      src/super_gradients/__init__.py
  9. 35
    0
      src/super_gradients/evaluate_checkpoint.py
  10. 44
    0
      src/super_gradients/evaluate_from_recipe.py
  11. 5
    37
      src/super_gradients/examples/evaluate_checkpoint_example/evaluate_checkpoint.py
  12. 5
    42
      src/super_gradients/examples/evaluate_from_recipe_example/evaluate_from_recipe.py
  13. 5
    24
      src/super_gradients/examples/qat_from_recipe_example/qat_from_recipe.py
  14. 5
    15
      src/super_gradients/examples/resume_experiment_example/resume_experiment.py
  15. 5
    19
      src/super_gradients/examples/train_from_kd_recipe_example/train_from_kd_recipe.py
  16. 5
    23
      src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py
  17. 26
    0
      src/super_gradients/qat_from_recipe.py
  18. 30
    30
      src/super_gradients/recipes/Training_Recipes.md
  19. 2
    2
      src/super_gradients/recipes/cifar10_resnet.yaml
  20. 3
    3
      src/super_gradients/recipes/cityscapes_ddrnet.yaml
  21. 2
    2
      src/super_gradients/recipes/cityscapes_kd_base.yaml
  22. 2
    2
      src/super_gradients/recipes/cityscapes_pplite_seg50.yaml
  23. 2
    2
      src/super_gradients/recipes/cityscapes_pplite_seg75.yaml
  24. 1
    1
      src/super_gradients/recipes/cityscapes_regseg48.yaml
  25. 1
    1
      src/super_gradients/recipes/cityscapes_segformer.yaml
  26. 2
    2
      src/super_gradients/recipes/cityscapes_stdc_seg50.yaml
  27. 2
    3
      src/super_gradients/recipes/cityscapes_stdc_seg75.yaml
  28. 1
    1
      src/super_gradients/recipes/coco2017_pose_dekr_w32_no_dc.yaml
  29. 4
    4
      src/super_gradients/recipes/coco2017_ppyoloe_l.yaml
  30. 4
    4
      src/super_gradients/recipes/coco2017_ppyoloe_m.yaml
  31. 4
    4
      src/super_gradients/recipes/coco2017_ppyoloe_s.yaml
  32. 4
    4
      src/super_gradients/recipes/coco2017_ppyoloe_x.yaml
  33. 2
    2
      src/super_gradients/recipes/coco2017_ssd_lite_mobilenet_v2.yaml
  34. 6
    6
      src/super_gradients/recipes/coco2017_yolox.yaml
  35. 1
    1
      src/super_gradients/recipes/coco_segmentation_shelfnet_lw.yaml
  36. 1
    1
      src/super_gradients/recipes/imagenet_efficientnet.yaml
  37. 1
    1
      src/super_gradients/recipes/imagenet_mobilenetv2.yaml
  38. 1
    1
      src/super_gradients/recipes/imagenet_mobilenetv3_large.yaml
  39. 1
    1
      src/super_gradients/recipes/imagenet_mobilenetv3_small.yaml
  40. 4
    4
      src/super_gradients/recipes/imagenet_regnetY.yaml
  41. 1
    1
      src/super_gradients/recipes/imagenet_repvgg.yaml
  42. 1
    1
      src/super_gradients/recipes/imagenet_resnet50.yaml
  43. 1
    1
      src/super_gradients/recipes/imagenet_resnet50_kd.yaml
  44. 1
    1
      src/super_gradients/recipes/imagenet_vit_base.yaml
  45. 1
    1
      src/super_gradients/recipes/imagenet_vit_large.yaml
  46. 1
    1
      src/super_gradients/recipes/roboflow_ppyoloe.yaml
  47. 1
    1
      src/super_gradients/recipes/roboflow_yolox.yaml
  48. 1
    1
      src/super_gradients/recipes/supervisely_unet.yaml
  49. 18
    0
      src/super_gradients/resume_experiment.py
  50. 26
    0
      src/super_gradients/train_from_kd_recipe.py
  51. 6
    7
      src/super_gradients/train_from_recipe.py
  52. 3
    3
      tutorials/what_are_recipes_and_how_to_use.ipynb
@@ -73,8 +73,8 @@ For more information on how to do it go to [Getting Started](#getting-started)
     
     
 
 
 #### Plug and play recipes
 #### Plug and play recipes
-```python
-python -m super_gradients.examples.train_from_recipe_example.train_from_recipe architecture=regnetY800 dataset_interface.data_dir=<YOUR_Imagenet_LOCAL_PATH> ckpt_root_dir=<CHEKPOINT_DIRECTORY>
+```bash
+python -m super_gradients.train_from_recipe architecture=regnetY800 dataset_interface.data_dir=<YOUR_Imagenet_LOCAL_PATH> ckpt_root_dir=<CHEKPOINT_DIRECTORY>
 ```
 ```
 More example on how and why to use recipes can be found in [Recipes](#recipes)
 More example on how and why to use recipes can be found in [Recipes](#recipes)
 
 
@@ -158,7 +158,7 @@ The most simple and straightforward way to start training SOTA performance model
 Just make sure that you [setup your dataset](https://github.com/Deci-AI/super-gradients/blob/master/src/super_gradients/training/datasets/Dataset_Setup_Instructions.md) according to the data dir specified in the recipe.
 Just make sure that you [setup your dataset](https://github.com/Deci-AI/super-gradients/blob/master/src/super_gradients/training/datasets/Dataset_Setup_Instructions.md) according to the data dir specified in the recipe.
 
 
 ```bash
 ```bash
-python -m super_gradients.examples.train_from_recipe_example.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY800 dataset_interface.data_dir=<YOUR_Imagenet_LOCAL_PATH> ckpt_root_dir=<CHEKPOINT_DIRECTORY>
+python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY800 dataset_interface.data_dir=<YOUR_Imagenet_LOCAL_PATH> ckpt_root_dir=<CHEKPOINT_DIRECTORY>
 ```
 ```
 ### Quickly Load Pre-Trained Weights for Your Desired Model with SOTA Performance
 ### Quickly Load Pre-Trained Weights for Your Desired Model with SOTA Performance
 Want to try our pre-trained models on your machine? Import SuperGradients, initialize your Trainer, and load your desired architecture and pre-trained weights from our [SOTA model zoo](http://bit.ly/41dkt89)
 Want to try our pre-trained models on your machine? Import SuperGradients, initialize your Trainer, and load your desired architecture and pre-trained weights from our [SOTA model zoo](http://bit.ly/41dkt89)
Discard
@@ -304,7 +304,7 @@ For more information on how to do it go to <span class="xref myst">Getting Start
 <div class="section" id="start-training-with-just-1-command-line">
 <div class="section" id="start-training-with-just-1-command-line">
 <h2>Start Training with Just 1 Command Line<a class="headerlink" href="#start-training-with-just-1-command-line" title="Permalink to this heading"></a></h2>
 <h2>Start Training with Just 1 Command Line<a class="headerlink" href="#start-training-with-just-1-command-line" title="Permalink to this heading"></a></h2>
 <p>The most simple and straightforward way to start training SOTA performance models with SuperGradients reproducible recipes. Just define your dataset path and where you want your checkpoints to be saved and you are good to go from your terminal!</p>
 <p>The most simple and straightforward way to start training SOTA performance models with SuperGradients reproducible recipes. Just define your dataset path and where you want your checkpoints to be saved and you are good to go from your terminal!</p>
-<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python -m super_gradients.examples.train_from_recipe_example.train_from_recipe --config-name<span class="o">=</span>imagenet_regnetY <span class="nv">architecture</span><span class="o">=</span>regnetY800 dataset_interface.data_dir<span class="o">=</span>&lt;YOUR_Imagenet_LOCAL_PATH&gt; <span class="nv">ckpt_root_dir</span><span class="o">=</span>&lt;CHEKPOINT_DIRECTORY&gt;
+<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python -m super_gradients.train_from_recipe --config-name<span class="o">=</span>imagenet_regnetY <span class="nv">architecture</span><span class="o">=</span>regnetY800 dataset_interface.data_dir<span class="o">=</span>&lt;YOUR_Imagenet_LOCAL_PATH&gt; <span class="nv">ckpt_root_dir</span><span class="o">=</span>&lt;CHEKPOINT_DIRECTORY&gt;
 </pre></div>
 </pre></div>
 </div>
 </div>
 </div>
 </div>
Discard
@@ -252,11 +252,11 @@ In both cases, SG allows flexibility of the other training-related parameters. F
 
 
 
 
 ```shell
 ```shell
-$ python train_from_recipe.py --config-name=cifar10_resnet experiment_name=cifar_experiment training_hyperparams.resume=True training_hyperparams.max_epochs=300
+python -m super_gradients.train_from_recipe --config-name=cifar10_resnet experiment_name=cifar_experiment training_hyperparams.resume=True training_hyperparams.max_epochs=300
 ```
 ```
 
 
 ```shell
 ```shell
-$ python train_from_recipe.py --config-name=cifar10_resnet experiment_name=cifar_experiment training_hyperparams.resume=True training_hyperparams.max_epochs=400
+python -m super_gradients.train_from_recipe --config-name=cifar10_resnet experiment_name=cifar_experiment training_hyperparams.resume=True training_hyperparams.max_epochs=400
 ```
 ```
 
 
 However, this flexibility comes with a price: we must be aware of any change in parameters (by command line overrides or hard-coded changes inside the yaml file configurations) if we wish to resume training.
 However, this flexibility comes with a price: we must be aware of any change in parameters (by command line overrides or hard-coded changes inside the yaml file configurations) if we wish to resume training.
Discard
@@ -31,7 +31,7 @@ After you meet the prerequisites, you can start training the model by running fr
 ### Training from recipe
 ### Training from recipe
 
 
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox multi_gpu=Off num_gpus=1
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox multi_gpu=Off num_gpus=1
 ```
 ```
 
 
 Note, the default configuration for this recipe is to use 8 GPUs in DDP mode. This hardware configuration may not be for everyone, so in the example above we override GPU settings to use a single GPU.
 Note, the default configuration for this recipe is to use 8 GPUs in DDP mode. This hardware configuration may not be for everyone, so in the example above we override GPU settings to use a single GPU.
Discard
@@ -34,7 +34,7 @@ After you met the prerequisites, you can start training the model by running fro
 ### Training from recipe
 ### Training from recipe
 
 
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_pose_dekr_w32 multi_gpu=Off num_gpus=1
+python -m super_gradients.train_from_recipe --config-name=coco2017_pose_dekr_w32 multi_gpu=Off num_gpus=1
 ```
 ```
 
 
 Note, the default configuration for recipe is to use 8 GPUs in DDP mode. This hardware configuration may not be for everyone, so we in the example above we override GPU settings to use single GPU.
 Note, the default configuration for recipe is to use 8 GPUs in DDP mode. This hardware configuration may not be for everyone, so we in the example above we override GPU settings to use single GPU.
Discard
@@ -296,7 +296,7 @@ plt.imshow(image)
 
 
 1. Launch one of SGs [training recipes](https://github.com/Deci-AI/super-gradients/blob/master/src/super_gradients/recipes/Training_Recipes.md). For example, Resnet18 on Cifar10:
 1. Launch one of SGs [training recipes](https://github.com/Deci-AI/super-gradients/blob/master/src/super_gradients/recipes/Training_Recipes.md). For example, Resnet18 on Cifar10:
 ```shell
 ```shell
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cifar10_resnet experiment_name=my_resnet18_cifar10_experiment
+python -m super_gradients.train_from_recipe --config-name=cifar10_resnet experiment_name=my_resnet18_cifar10_experiment
 ```
 ```
 
 
 Learn more in detail on how to launch, customize and evaluate training recipes from our [training with configuration files tutorial](configuration_files.md)
 Learn more in detail on how to launch, customize and evaluate training recipes from our [training with configuration files tutorial](configuration_files.md)
Discard
@@ -80,10 +80,9 @@ stored or transmitted ([Wikipedia](https://en.wikipedia.org/wiki/YAML)). We pars
 either as a recursive dictionary or as function arguments. 
 either as a recursive dictionary or as function arguments. 
 
 
 Let's try running a training session from a configuration file.
 Let's try running a training session from a configuration file.
-In your SG project, go to the examples directory and run the `train_from_recipe.py` script as shown below: 
-```commandline
-cd src/super_gradients/examples/train_from_recipe_example
-python train_from_recipe.py --config-name=cifar10_resnet
+ 
+```shell
+python -m super_gradients.train_from_recipe --config-name=cifar10_resnet
 ```
 ```
 You can stop the training after a few cycles. 
 You can stop the training after a few cycles. 
 
 
@@ -97,13 +96,13 @@ You will see a different result now. This is because the parameters from `cifar1
 
 
 Two more useful functionalities are 
 Two more useful functionalities are 
 ```commandline
 ```commandline
-python resume_experiment.py --experiment_name=cifar10_resnet
+python -m super_gradients.resume_experiment --experiment_name=cifar10_resnet
 ```
 ```
 
 
 that will resume the experiment from the last checkpoint, and
 that will resume the experiment from the last checkpoint, and
 
 
 ```commandline
 ```commandline
-evaluate_from_recipe.py --config-name=cifar10_resnet
+python -m super_gradients.evaluate_from_recipe --config-name=cifar10_resnet
 ```
 ```
 that will run only the evaluation part of the recipe (without any training iterations)
 that will run only the evaluation part of the recipe (without any training iterations)
 
 
@@ -156,8 +155,8 @@ The aggregated configuration file will be saved in the `.hydra` subdirectory.
 
 
 #### Command-Line Overrides
 #### Command-Line Overrides
 When running with Hydra, you can override or even add configuration from the command line. These override will apply to the specific run only.
 When running with Hydra, you can override or even add configuration from the command line. These override will apply to the specific run only.
-```commandline
-python train_from_recipe.py --config-name=cifar10_resnet training_hyperparams.initial_lr=0.02 experiment_name=test_lr_002
+```shell
+python -m super_gradients.train_from_recipe --config-name=cifar10_resnet training_hyperparams.initial_lr=0.02 experiment_name=test_lr_002
 ```
 ```
 In the example above, the same script we launched earlier is used, but this time it will run with a different experiment name and a different 
 In the example above, the same script we launched earlier is used, but this time it will run with a different experiment name and a different 
 initial learning-rate. This feature is extremely usefully when experimenting with different hyper-parameters.
 initial learning-rate. This feature is extremely usefully when experimenting with different hyper-parameters.
Discard
@@ -1,8 +1,6 @@
 from super_gradients.common import init_trainer, is_distributed, object_names
 from super_gradients.common import init_trainer, is_distributed, object_names
 from super_gradients.training import losses, utils, datasets_utils, DataAugmentation, Trainer, KDTrainer, QATTrainer
 from super_gradients.training import losses, utils, datasets_utils, DataAugmentation, Trainer, KDTrainer, QATTrainer
 from super_gradients.common.registry.registry import ARCHITECTURES
 from super_gradients.common.registry.registry import ARCHITECTURES
-from super_gradients.examples.train_from_recipe_example import train_from_recipe
-from super_gradients.examples.train_from_kd_recipe_example import train_from_kd_recipe
 from super_gradients.sanity_check import env_sanity_check
 from super_gradients.sanity_check import env_sanity_check
 from super_gradients.training.utils.distributed_training_utils import setup_device
 from super_gradients.training.utils.distributed_training_utils import setup_device
 
 
@@ -18,8 +16,6 @@ __all__ = [
     "object_names",
     "object_names",
     "init_trainer",
     "init_trainer",
     "is_distributed",
     "is_distributed",
-    "train_from_recipe",
-    "train_from_kd_recipe",
     "env_sanity_check",
     "env_sanity_check",
     "setup_device",
     "setup_device",
 ]
 ]
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  1. """
  2. Evaluate a checkpoint resulting from an experiment that you ran previously.
  3. Use this script if:
  4. - You want to evaluate a checkpoint resulting from one of your previous experiment,
  5. using the same parameters (dataset, valid_metrics,...) as used during the training of the experiment.
  6. Don't use this script if:
  7. - You want to train and evaluate a model (use examples/train_from_recipe_example)
  8. - You want to evaluate a pretrained model from model zoo (use examples/evaluate_from_recipe_example)
  9. - You want to evaluate a checkpoint from one of your previous experiment, but with different validation parameters
  10. such as dataset params or metrics for instance (use examples/evaluate_from_recipe_example)
  11. Note:
  12. The parameters will be unchanged even if the recipe used for that experiment was changed since then.
  13. This is to ensure that validation of the experiment will remain exactly the same as during training.
  14. Example: python -m super_gradients.evaluate_checkpoint --experiment_name=my_experiment_name --ckpt_name=average_model.pth
  15. -> Evaluate the checkpoint average_model from experiment my_experiment_name.
  16. """
  17. from super_gradients import Trainer, init_trainer
  18. from super_gradients.common.environment.argparse_utils import pop_arg
  19. def main() -> None:
  20. init_trainer()
  21. experiment_name = pop_arg("experiment_name")
  22. ckpt_name = pop_arg("ckpt_name", default_value="ckpt_latest.pth")
  23. ckpt_root_dir = pop_arg("ckpt_root_dir", default_value=None)
  24. Trainer.evaluate_checkpoint(experiment_name=experiment_name, ckpt_name=ckpt_name, ckpt_root_dir=ckpt_root_dir)
  25. if __name__ == "__main__":
  26. main()
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  1. """
  2. Evaluate a SuperGradient's recipes.
  3. Use this script if:
  4. - You want to evaluate a pretrained model from model zoo
  5. - You want to evaluate a checkpoint from one of your previous experiment, but with different validation parameters
  6. such as dataset params or metrics for instance
  7. Don't use this script if:
  8. - You want to train and evaluate a model (use examples/train_from_recipe_example)
  9. - You want to evaluate a checkpoint from one of your previous experiment, using the same parameters as used during the
  10. training of the experiment (use examples/evaluate_checkpoint_example)
  11. Note:
  12. This script does NOT run TRAINING, so make sure in the recipe that you load a PRETRAINED MODEL
  13. either from one of your checkpoint or from a pretrained model.
  14. General use: python -m super_gradients.evaluate_from_recipe --config-name="DESIRED_RECIPE".
  15. -> Evaluate the latest checkpoint according to parameters set in "DESIRED_RECIPE"
  16. You can specify which checkpoint you want to evaluate by overriding training_hyperparams.ckpt_name as in the following example:
  17. python -m super_gradients.evaluate_from_recipe --config-name="DESIRED_RECIPE" training_hyperparams.ckpt_name=average_model.pth
  18. -> Evaluate the checkpoint 'average_model.pth' according to parameters set in "DESIRED_RECIPE"
  19. For recipe's specific instructions and details refer to the recipe's configuration file in the recipes directory.
  20. """
  21. from omegaconf import DictConfig
  22. import hydra
  23. from super_gradients import Trainer, init_trainer
  24. @hydra.main(config_path="recipes", version_base="1.2")
  25. def _main(cfg: DictConfig) -> None:
  26. Trainer.evaluate_from_recipe(cfg)
  27. def main() -> None:
  28. init_trainer() # `init_trainer` needs to be called before `@hydra.main`
  29. _main()
  30. if __name__ == "__main__":
  31. main()
Discard
@@ -1,40 +1,8 @@
-"""
-Evaluate a checkpoint resulting from an experiment that you ran previously.
+import warnings
 
 
-Use this script if:
-    - You want to evaluate a checkpoint resulting from one of your previous experiment,
-        using the same parameters (dataset, valid_metrics,...) as used during the training of the experiment.
-
-Don't use this script if:
-    - You want to train and evaluate a model (use examples/train_from_recipe_example)
-    - You want to evaluate a pretrained model from model zoo (use examples/evaluate_from_recipe_example)
-    - You want to evaluate a checkpoint from one of your previous experiment, but with different validation parameters
-        such as dataset params or metrics for instance (use examples/evaluate_from_recipe_example)
-
-Note:
-    The parameters will be unchanged even if the recipe used for that experiment was changed since then.
-    This is to ensure that validation of the experiment will remain exactly the same as during training.
-
-Example: python evaluate_checkpoint.py --experiment_name=my_experiment_name --ckpt_name=average_model.pth
--> Evaluate the checkpoint average_model from experiment my_experiment_name.
-
-"""
-from super_gradients import Trainer, init_trainer
-from super_gradients.common.environment.argparse_utils import pop_arg
-
-
-def main() -> None:
-    init_trainer()
-    experiment_name = pop_arg("experiment_name")
-    ckpt_name = pop_arg("ckpt_name", default_value="ckpt_latest.pth")
-    ckpt_root_dir = pop_arg("ckpt_root_dir", default_value=None)
-    Trainer.evaluate_checkpoint(experiment_name=experiment_name, ckpt_name=ckpt_name, ckpt_root_dir=ckpt_root_dir)
-
-
-def run():
-    init_trainer()
-    main()
+if __name__ == "__main__":
 
 
+    warnings.warn("This script is deprecated and will be removed in the future. Please use `super_gradients.evaluate_checkpoint` instead.", DeprecationWarning)
+    from super_gradients import evaluate_checkpoint
 
 
-if __name__ == "__main__":
-    run()
+    evaluate_checkpoint.main()
Discard
@@ -1,45 +1,8 @@
-"""
-Evaluate a SuperGradient's recipes.
+import warnings
 
 
-Use this script if:
-    - You want to evaluate a pretrained model from model zoo
-    - You want to evaluate a checkpoint from one of your previous experiment, but with different validation parameters
-        such as dataset params or metrics for instance
-
-Don't use this script if:
-    - You want to train and evaluate a model (use examples/train_from_recipe_example)
-    - You want to evaluate a checkpoint from one of your previous experiment, using the same parameters as used during the
-        training of the experiment (use examples/evaluate_checkpoint_example)
-
-Note:
-    This script does NOT run TRAINING, so make sure in the recipe that you load a PRETRAINED MODEL
-    either from one of your checkpoint or from a pretrained model.
-
-General use: python evaluate_from_recipe.py --config-name="DESIRED_RECIPE".
--> Evaluate the latest checkpoint according to parameters set in "DESIRED_RECIPE"
-
-You can specify which checkpoint you want to evaluate by overriding training_hyperparams.ckpt_name as in the following example:
-python evaluate_from_recipe.py --config-name="DESIRED_RECIPE" training_hyperparams.ckpt_name=average_model.pth
--> Evaluate the checkpoint 'average_model.pth' according to parameters set in "DESIRED_RECIPE"
-
-For recipe's specific instructions and details refer to the recipe's configuration file in the recipes directory.
-"""
-from omegaconf import DictConfig
-import hydra
-import pkg_resources
-
-from super_gradients import Trainer, init_trainer
-
-
-@hydra.main(config_path=pkg_resources.resource_filename("super_gradients.recipes", ""), version_base="1.2")
-def main(cfg: DictConfig) -> None:
-    Trainer.evaluate_from_recipe(cfg)
-
-
-def run():
-    init_trainer()
-    main()
+if __name__ == "__main__":
 
 
+    warnings.warn("This script is deprecated and will be removed in the future. Please use `super_gradients.evaluate_from_recipe` instead.", DeprecationWarning)
+    from super_gradients import evaluate_from_recipe
 
 
-if __name__ == "__main__":
-    run()
+    evaluate_from_recipe.main()
Discard
@@ -1,27 +1,8 @@
-"""
-Example code for running QAT on SuperGradient's recipes.
+import warnings
 
 
-General use: python train_from_recipe.py --config-name="DESIRED_RECIPE".
-For recipe's specific instructions and details refer to the recipe's configuration file in the recipes directory.
-"""
-
-import hydra
-import pkg_resources
-from omegaconf import DictConfig
-
-from super_gradients import init_trainer
-from super_gradients.training.qat_trainer.qat_trainer import QATTrainer
-
-
-@hydra.main(config_path=pkg_resources.resource_filename("super_gradients.recipes", ""), version_base="1.2")
-def main(cfg: DictConfig) -> None:
-    QATTrainer.train_from_config(cfg)
-
-
-def run():
-    init_trainer()
-    main()
+if __name__ == "__main__":
 
 
+    warnings.warn("This script is deprecated and will be removed in the future. Please use `super_gradients.qat_from_recipe` instead.", DeprecationWarning)
+    from super_gradients import qat_from_recipe
 
 
-if __name__ == "__main__":
-    run()
+    qat_from_recipe.main()
Discard
@@ -1,18 +1,8 @@
-"""
-Example code for resuming SuperGradient's recipes.
+import warnings
 
 
-General use: python resume_experiment.py --experiment_name=<PREVIOUSLY-RUN-EXPERIMENT>
-"""
-from super_gradients import Trainer, init_trainer
-from super_gradients.common.environment.argparse_utils import pop_arg
-
-
-def main() -> None:
-    init_trainer()
-    experiment_name = pop_arg("experiment_name")
-    ckpt_root_dir = pop_arg("ckpt_root_dir")
-    Trainer.resume_experiment(experiment_name=experiment_name, ckpt_root_dir=ckpt_root_dir)
+if __name__ == "__main__":
 
 
+    warnings.warn("This script is deprecated and will be removed in the future. Please use `super_gradients.resume_experiment` instead.", DeprecationWarning)
+    from super_gradients import resume_experiment
 
 
-if __name__ == "__main__":
-    main()
+    resume_experiment.main()
Discard
@@ -1,22 +1,8 @@
-"""
-Example code for running SuperGradient's recipes.
+import warnings
 
 
-General use: python train_from_kd_recipe.py --config-name="DESIRED_RECIPE".
-For recipe's specific instructions and details refer to the recipe's configuration file in the recipes directory.
-"""
-
-import super_gradients
-from omegaconf import DictConfig
-import hydra
-import pkg_resources
-from super_gradients.training.kd_trainer import KDTrainer
-
-
-@hydra.main(config_path=pkg_resources.resource_filename("super_gradients.recipes", ""), version_base="1.2")
-def main(cfg: DictConfig) -> None:
-    KDTrainer.train_from_config(cfg)
+if __name__ == "__main__":
 
 
+    warnings.warn("This script is deprecated and will be removed in the future. Please use `super_gradients.train_from_kd_recipe` instead.", DeprecationWarning)
+    from super_gradients import train_from_kd_recipe
 
 
-if __name__ == "__main__":
-    super_gradients.init_trainer()
-    main()
+    train_from_kd_recipe.main()
Discard
@@ -1,26 +1,8 @@
-"""
-Example code for running SuperGradient's recipes.
+import warnings
 
 
-General use: python train_from_recipe.py --config-name="DESIRED_RECIPE".
-For recipe's specific instructions and details refer to the recipe's configuration file in the recipes directory.
-"""
-
-from omegaconf import DictConfig
-import hydra
-import pkg_resources
-
-from super_gradients import Trainer, init_trainer
-
-
-@hydra.main(config_path=pkg_resources.resource_filename("super_gradients.recipes", ""), version_base="1.2")
-def main(cfg: DictConfig) -> None:
-    Trainer.train_from_config(cfg)
-
-
-def run():
-    init_trainer()
-    main()
+if __name__ == "__main__":
 
 
+    warnings.warn("This script is deprecated and will be removed in the future. Please use `super_gradients.train_from_recipe` instead.", DeprecationWarning)
+    from super_gradients import train_from_recipe
 
 
-if __name__ == "__main__":
-    run()
+    train_from_recipe.main()
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  1. """
  2. Example code for running QAT on SuperGradient's recipes.
  3. General use: python -m super_gradients.qat_from_recipe --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 hydra
  7. from omegaconf import DictConfig
  8. from super_gradients import init_trainer
  9. from super_gradients.training.qat_trainer.qat_trainer import QATTrainer
  10. @hydra.main(config_path="recipes", version_base="1.2")
  11. def _main(cfg: DictConfig) -> None:
  12. QATTrainer.train_from_config(cfg)
  13. def main():
  14. init_trainer() # `init_trainer` needs to be called before `@hydra.main`
  15. _main()
  16. if __name__ == "__main__":
  17. main()
Discard
@@ -27,7 +27,7 @@ export PYTHONPATH=$PYTHONPATH:<YOUR-LOCAL-PATH>/super-gradients/
 The recipes are defined in .yaml format and we use the hydra library to allow you to easily customize the parameters.
 The recipes are defined in .yaml format and we use the hydra library to allow you to easily customize the parameters.
 The basic basic syntax is as follow:
 The basic basic syntax is as follow:
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=<CONFIG-NAME> dataset_params.data_dir=<PATH-TO-DATASET>
+python -m super_gradients.train_from_recipe --config-name=<CONFIG-NAME> dataset_params.data_dir=<PATH-TO-DATASET>
 ```
 ```
 *Note: this script needs to be launched from the root folder of super_gradients*
 *Note: this script needs to be launched from the root folder of super_gradients*
 *Note: if you stored your dataset in the path specified by the recipe you can drop "dataset_params.data_dir=<PATH-TO-DATASET>".*
 *Note: if you stored your dataset in the path specified by the recipe you can drop "dataset_params.data_dir=<PATH-TO-DATASET>".*
@@ -39,7 +39,7 @@ You will find information about the performance of a recipe as well as the comma
 
 
 *Example: [Training of YoloX Small on Coco 2017](https://github.com/Deci-AI/super-gradients/blob/master/src/super_gradients/recipes/coco2017_yolox.yaml), using 8 GPU* 
 *Example: [Training of YoloX Small on Coco 2017](https://github.com/Deci-AI/super-gradients/blob/master/src/super_gradients/recipes/coco2017_yolox.yaml), using 8 GPU* 
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_s dataset_params.data_dir=/home/coco2017
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_s dataset_params.data_dir=/home/coco2017
 ```
 ```
 
 
 
 
@@ -55,7 +55,7 @@ Please make to "dataset_params.data_dir=<PATH-TO-DATASET>" if you did not store
 
 
 resnet
 resnet
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cifar10_resnet +experiment_name=cifar10
+python -m super_gradients.train_from_recipe --config-name=cifar10_resnet +experiment_name=cifar10
 ```
 ```
 
 
 </details>
 </details>
@@ -64,65 +64,65 @@ python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.
 
 
 efficientnet
 efficientnet
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_efficientnet
+python -m super_gradients.train_from_recipe --config-name=imagenet_efficientnet
 ```
 ```
 mobilenetv2
 mobilenetv2
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv2
+python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv2
 ```
 ```
 mobilenetv3 small
 mobilenetv3 small
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv3_small
+python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv3_small
 ```
 ```
 
 
 mobilenetv3 large
 mobilenetv3 large
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv3_large
+python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv3_large
 ```
 ```
 
 
 regnetY200
 regnetY200
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY200
+python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY200
 ```
 ```
 
 
 regnetY400
 regnetY400
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY400
+python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY400
 ```
 ```
 
 
 regnetY600
 regnetY600
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY600
+python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY600
 ```
 ```
 
 
 regnetY800
 regnetY800
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY800
+python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY800
 ```
 ```
 
 
 repvgg
 repvgg
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_repvgg
+python -m super_gradients.train_from_recipe --config-name=imagenet_repvgg
 ```
 ```
 
 
 resnet50
 resnet50
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_resnet50
+python -m super_gradients.train_from_recipe --config-name=imagenet_resnet50
 ```
 ```
 
 
 resnet50_kd
 resnet50_kd
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_kd_recipe_example/train_from_kd_recipe.py --config-name=imagenet_resnet50_kd
+python -m super_gradients.train_from_kd_recipe --config-name=imagenet_resnet50_kd
 ```
 ```
 
 
 vit_base
 vit_base
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_vit_base
+python -m super_gradients.train_from_recipe --config-name=imagenet_vit_base
 ```
 ```
 
 
 vit_large
 vit_large
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_vit_large
+python -m super_gradients.train_from_recipe --config-name=imagenet_vit_large
 ```
 ```
 </details>
 </details>
 
 
@@ -133,37 +133,37 @@ python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.
 
 
 ssd_lite_mobilenet_v2
 ssd_lite_mobilenet_v2
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ssd_lite_mobilenet_v2
+python -m super_gradients.train_from_recipe --config-name=coco2017_ssd_lite_mobilenet_v2
 ```
 ```
 
 
 yolox_n
 yolox_n
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_n
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_n
 ```
 ```
 
 
 yolox_t
 yolox_t
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_t
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_t
 ```
 ```
 
 
 yolox_s
 yolox_s
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_s
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_s
 ```
 ```
 
 
 yolox_m
 yolox_m
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_m
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_m
 ```
 ```
 
 
 yolox_l
 yolox_l
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_l
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_l
 ```
 ```
 
 
 yolox_x
 yolox_x
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_x
+python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_x
 ```
 ```
 
 
 </details>
 </details>
@@ -176,37 +176,37 @@ python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.
 
 
 DDRNet23
 DDRNet23
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet
+python -m super_gradients.train_from_recipe --config-name=cityscapes_ddrnet
 ```
 ```
 
 
 DDRNet23-Slim
 DDRNet23-Slim
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet architecture=ddrnet_23_slim
+python -m super_gradients.train_from_recipe --config-name=cityscapes_ddrnet architecture=ddrnet_23_slim
 ```
 ```
 
 
 RegSeg48
 RegSeg48
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_regseg48
+python -m super_gradients.train_from_recipe --config-name=cityscapes_regseg48
 ```
 ```
 
 
 STDC1-Seg50
 STDC1-Seg50
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg50
+python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg50
 ```
 ```
 
 
 STDC2-Seg50
 STDC2-Seg50
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg50 architecture=stdc2_seg
+python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg50 architecture=stdc2_seg
 ```
 ```
 
 
 STDC1-Seg75
 STDC1-Seg75
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg75
+python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg75
 ```
 ```
 
 
 STDC2-Seg75
 STDC2-Seg75
 ```bash
 ```bash
-python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg75 external_checkpoint_path=<stdc2-backbone-pretrained-path> architecture=stdc2_seg
+python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg75 external_checkpoint_path=<stdc2-backbone-pretrained-path> architecture=stdc2_seg
 ```
 ```
 
 
 </details>
 </details>
Discard
@@ -4,10 +4,10 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cifar10_resnet +experiment_name=cifar10
+#       python -m super_gradients.train_from_recipe --config-name=cifar10_resnet +experiment_name=cifar10
 #
 #
 #   To use equivalent Albumentations transforms pipeline set dataset_params to cifar10_albumentations_dataset_params:
 #   To use equivalent Albumentations transforms pipeline set dataset_params to cifar10_albumentations_dataset_params:
-#     python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cifar10_resnet dataset_params=cifar10_albumentations_dataset_params
+#     python -m super_gradients.train_from_recipe --config-name=cifar10_resnet dataset_params=cifar10_albumentations_dataset_params
 defaults:
 defaults:
   - training_hyperparams: cifar10_resnet_train_params
   - training_hyperparams: cifar10_resnet_train_params
   - dataset_params: cifar10_dataset_params
   - dataset_params: cifar10_dataset_params
Discard
@@ -9,9 +9,9 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#      DDRNet23:        python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet
-#      DDRNet23-Slim:   python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet architecture=ddrnet_23_slim
-#      DDRNet39:        python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_ddrnet architecture=ddrnet_39
+#      DDRNet23:        python -m super_gradients.train_from_recipe --config-name=cityscapes_ddrnet
+#      DDRNet23-Slim:   python -m super_gradients.train_from_recipe --config-name=cityscapes_ddrnet architecture=ddrnet_23_slim
+#      DDRNet39:        python -m super_gradients.train_from_recipe --config-name=cityscapes_ddrnet architecture=ddrnet_39
 # Note: add "checkpoint_params.checkpoint_path=<ddrnet23-backbone-pretrained-path>" to use pretrained backbone
 # Note: add "checkpoint_params.checkpoint_path=<ddrnet23-backbone-pretrained-path>" to use pretrained backbone
 #
 #
 #  Validation mIoU - Cityscapes, training time:
 #  Validation mIoU - Cityscapes, training time:
Discard
@@ -4,8 +4,8 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#      DDRNet23:        python src/super_gradients/examples/train_from_kd_recipe_example/train_from_kd_recipe.py --config-name=cityscapes_kd_base student_architecture=ddrnet_23
-#      DDRNet23-Slim:   python src/super_gradients/examples/train_from_kd_recipe_example/train_from_kd_recipe.py --config-name=cityscapes_kd_base student_architecture=ddrnet_23_slim
+#      DDRNet23:        python -m super_gradients.train_from_kd_recipe --config-name=cityscapes_kd_base student_architecture=ddrnet_23
+#      DDRNet23-Slim:   python -m super_gradients.train_from_kd_recipe --config-name=cityscapes_kd_base student_architecture=ddrnet_23_slim
 # Note: add "student_checkpoint_params.checkpoint_path=<ddrnet23-backbone-pretrained-path>" to use pretrained backbone
 # Note: add "student_checkpoint_params.checkpoint_path=<ddrnet23-backbone-pretrained-path>" to use pretrained backbone
 #
 #
 #  Teachers specifications:
 #  Teachers specifications:
Discard
@@ -8,8 +8,8 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       PPLite-T-Seg50: python src/super_gradients/examples/train_from_recipe.py --config-name=cityscapes_pplite_seg50 checkpoint_params.checkpoint_path=<stdc1-backbone-pretrained-path> architecture=pp_lite_t_seg
-#       PPLite-B-Seg50: python src/super_gradients/examples/train_from_recipe.py --config-name=cityscapes_pplite_seg50 checkpoint_params.checkpoint_path=<stdc2-backbone-pretrained-path> architecture=pp_lite_b_seg
+#       PPLite-T-Seg50: python -m super_gradients.train_from_recipe --config-name=cityscapes_pplite_seg50 checkpoint_params.checkpoint_path=<stdc1-backbone-pretrained-path> architecture=pp_lite_t_seg
+#       PPLite-B-Seg50: python -m super_gradients.train_from_recipe --config-name=cityscapes_pplite_seg50 checkpoint_params.checkpoint_path=<stdc2-backbone-pretrained-path> architecture=pp_lite_b_seg
 #
 #
 #
 #
 #  Validation mIoU - Cityscapes, training time:
 #  Validation mIoU - Cityscapes, training time:
Discard
@@ -8,8 +8,8 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       PPLite-T-Seg75: python src/super_gradients/examples/train_from_recipe.py --config-name=cityscapes_pplite_seg75 checkpoint_params.checkpoint_path=<stdc1-backbone-pretrained-path> architecture=pp_lite_t_seg
-#       PPLite-B-Seg75: python src/super_gradients/examples/train_from_recipe.py --config-name=cityscapes_pplite_seg75 checkpoint_params.checkpoint_path=<stdc2-backbone-pretrained-path> architecture=pp_lite_b_seg
+#       PPLite-T-Seg75: python -m super_gradients.train_from_recipe --config-name=cityscapes_pplite_seg75 checkpoint_params.checkpoint_path=<stdc1-backbone-pretrained-path> architecture=pp_lite_t_seg
+#       PPLite-B-Seg75: python -m super_gradients.train_from_recipe --config-name=cityscapes_pplite_seg75 checkpoint_params.checkpoint_path=<stdc2-backbone-pretrained-path> architecture=pp_lite_b_seg
 #
 #
 #
 #
 #  Validation mIoU - Cityscapes, training time:
 #  Validation mIoU - Cityscapes, training time:
Discard
@@ -6,7 +6,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_regseg48
+#       python -m super_gradients.train_from_recipe --config-name=cityscapes_regseg48
 #
 #
 #
 #
 #  Validation mIoU - Cityscapes, training time:
 #  Validation mIoU - Cityscapes, training time:
Discard
@@ -20,7 +20,7 @@
 #   5. Edit the "ckpt_root_dir" field to the path where you want to save checkpoints and logs
 #   5. Edit the "ckpt_root_dir" field to the path where you want to save checkpoints and logs
 #   6. Move to the project root (where you will find the ReadMe and src folder)
 #   6. Move to the project root (where you will find the ReadMe and src folder)
 #   7. Run the command (change:
 #   7. Run the command (change:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_segformer
+#       python -m super_gradients.train_from_recipe --config-name=cityscapes_segformer
 #
 #
 #
 #
 # Imagenet-1K pre-trained backbone:
 # Imagenet-1K pre-trained backbone:
Discard
@@ -6,8 +6,8 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       STDC1-Seg50: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg50
-#       STDC2-Seg50: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg50 architecture=stdc2_seg
+#       STDC1-Seg50: python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg50
+#       STDC2-Seg50: python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg50 architecture=stdc2_seg
 # Note: add "checkpoint_params.checkpoint_path=<stdc1-backbone-pretrained-path>" to use pretrained backbone
 # Note: add "checkpoint_params.checkpoint_path=<stdc1-backbone-pretrained-path>" to use pretrained backbone
 #
 #
 #
 #
Discard
@@ -6,8 +6,8 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       STDC1-Seg75: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg75
-#       STDC2-Seg75: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=cityscapes_stdc_seg75 architecture=stdc2_seg
+#       STDC1-Seg75: python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg75
+#       STDC2-Seg75: python -m super_gradients.train_from_recipe --config-name=cityscapes_stdc_seg75 architecture=stdc2_seg
 # Note: add "external_checkpoint_path=<stdc1-backbone-pretrained-path>" to use pretrained backbone
 # Note: add "external_checkpoint_path=<stdc1-backbone-pretrained-path>" to use pretrained backbone
 #
 #
 #
 #
@@ -85,4 +85,3 @@ hydra:
   run:
   run:
     # Set the output directory (i.e. where .hydra folder that logs all the input params will be generated)
     # Set the output directory (i.e. where .hydra folder that logs all the input params will be generated)
     dir: ${hydra_output_dir:${ckpt_root_dir}, ${experiment_name}}
     dir: ${hydra_output_dir:${ckpt_root_dir}, ${experiment_name}}
-
Discard
@@ -7,7 +7,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       DEKR-W32: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_pose_dekr_w32_no_dc
+#       DEKR-W32: python -m super_gradients.train_from_recipe --config-name=coco2017_pose_dekr_w32_no_dc
 #  NOTE: Add "checkpoint_params.checkpoint_path=<hrnet-pretrained-path>" to use pretrained backbone (See line 55).
 #  NOTE: Add "checkpoint_params.checkpoint_path=<hrnet-pretrained-path>" to use pretrained backbone (See line 55).
 #
 #
 #
 #
Discard
@@ -8,10 +8,10 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command you want:
 #   2. Run the command you want:
-#         ppyoloe_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_s
-#         ppyoloe_m: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_m
-#         ppyoloe_l: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_l
-#         ppyoloe_x: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_x
+#         ppyoloe_s: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_s
+#         ppyoloe_m: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_m
+#         ppyoloe_l: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_l
+#         ppyoloe_x: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_x
 #
 #
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
Discard
@@ -8,10 +8,10 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command you want:
 #   2. Run the command you want:
-#         ppyoloe_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_s
-#         ppyoloe_m: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_m
-#         ppyoloe_l: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_l
-#         ppyoloe_x: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_x
+#         ppyoloe_s: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_s
+#         ppyoloe_m: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_m
+#         ppyoloe_l: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_l
+#         ppyoloe_x: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_x
 #
 #
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
Discard
@@ -6,10 +6,10 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command you want:
 #   2. Run the command you want:
-#         ppyoloe_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_s
-#         ppyoloe_m: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_m
-#         ppyoloe_l: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_l
-#         ppyoloe_x: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_x
+#         ppyoloe_s: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_s
+#         ppyoloe_m: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_m
+#         ppyoloe_l: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_l
+#         ppyoloe_x: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_x
 #
 #
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
Discard
@@ -8,10 +8,10 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command you want:
 #   2. Run the command you want:
-#         ppyoloe_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_s
-#         ppyoloe_m: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_m
-#         ppyoloe_l: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_l
-#         ppyoloe_x: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ppyoloe_x
+#         ppyoloe_s: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_s
+#         ppyoloe_m: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_m
+#         ppyoloe_l: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_l
+#         ppyoloe_x: python -m super_gradients.train_from_recipe --config-name=coco2017_ppyoloe_x
 #
 #
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
 #         ppyoloe_s: 37h  on 8 NVIDIA GeForce RTX 3090, mAP: 42.52 (val)
Discard
@@ -11,14 +11,14 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ssd_lite_mobilenet_v2
+#       python -m super_gradients.train_from_recipe --config-name=coco2017_ssd_lite_mobilenet_v2
 
 
 
 
 # NOTE:
 # NOTE:
 # Anchors will be selected based on validation resolution and anchors_name
 # Anchors will be selected based on validation resolution and anchors_name
 # To switch between anchors, set anchors_name to something else defined in the anchors section
 # To switch between anchors, set anchors_name to something else defined in the anchors section
 # e.g.
 # e.g.
-# python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_ssd_lite_mobilenet_v2 anchors_name=stride_16_plus
+# python -m super_gradients.train_from_recipe --config-name=coco2017_ssd_lite_mobilenet_v2 anchors_name=stride_16_plus
 
 
 
 
 defaults:
 defaults:
Discard
@@ -8,12 +8,12 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command you want:
 #   2. Run the command you want:
-#         yolox_n: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_n
-#         yolox_t: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_t
-#         yolox_s: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_s
-#         yolox_m: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_m
-#         yolox_l: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_l
-#         yolox_x: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco2017_yolox architecture=yolox_x
+#         yolox_n: python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_n
+#         yolox_t: python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_t
+#         yolox_s: python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_s
+#         yolox_m: python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_m
+#         yolox_l: python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_l
+#         yolox_x: python -m super_gradients.train_from_recipe --config-name=coco2017_yolox architecture=yolox_x
 #
 #
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 # Training times and accuracies (mAP@0.5-0.95 (COCO API, confidence 0.001, IoU threshold 0.6, test on 640x640 images):
 #         yolox_n: 1d 16h 33m 9s  on 8 NVIDIA GeForce RTX 3090, mAP: 26.77
 #         yolox_n: 1d 16h 33m 9s  on 8 NVIDIA GeForce RTX 3090, mAP: 26.77
Discard
@@ -9,7 +9,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=coco_segmentation_shelfnet_lw
+#       python -m super_gradients.train_from_recipe --config-name=coco_segmentation_shelfnet_lw
 
 
 
 
 # /!\ THIS RECIPE IS NOT SUPPORTED AT THE MOMENT /!\
 # /!\ THIS RECIPE IS NOT SUPPORTED AT THE MOMENT /!\
Discard
@@ -6,7 +6,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_efficientnet
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_efficientnet
 
 
 defaults:
 defaults:
   - training_hyperparams: imagenet_efficientnet_train_params
   - training_hyperparams: imagenet_efficientnet_train_params
Discard
@@ -7,7 +7,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv2
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv2
 
 
 defaults:
 defaults:
   - training_hyperparams: imagenet_mobilenetv2_train_params
   - training_hyperparams: imagenet_mobilenetv2_train_params
Discard
@@ -5,7 +5,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv3_large
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv3_large
 
 
 
 
 defaults:
 defaults:
Discard
@@ -5,7 +5,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_mobilenetv3_small
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_mobilenetv3_small
 
 
 
 
 defaults:
 defaults:
Discard
@@ -17,10 +17,10 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#         regnetY200: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY200
-#         regnetY400: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY400
-#         regnetY600: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY600
-#         regnetY800: python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_regnetY architecture=regnetY800
+#         regnetY200: python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY200
+#         regnetY400: python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY400
+#         regnetY600: python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY600
+#         regnetY800: python -m super_gradients.train_from_recipe --config-name=imagenet_regnetY architecture=regnetY800
 
 
 defaults:
 defaults:
   - training_hyperparams: imagenet_regnetY_train_params
   - training_hyperparams: imagenet_regnetY_train_params
Discard
@@ -9,7 +9,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_repvgg
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_repvgg
 
 
 defaults:
 defaults:
   - training_hyperparams: imagenet_repvgg_train_params
   - training_hyperparams: imagenet_repvgg_train_params
Discard
@@ -9,7 +9,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_resnet50
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_resnet50
 
 
 
 
 defaults:
 defaults:
Discard
@@ -9,7 +9,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_kd_recipe_example/train_from_kd_recipe.py --config-name=imagenet_resnet50_kd
+#       python -m super_gradients.train_from_kd_recipe --config-name=imagenet_resnet50_kd
 
 
 
 
 defaults:
 defaults:
Discard
@@ -9,7 +9,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_vit_base
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_vit_base
 
 
 
 
 defaults:
 defaults:
Discard
@@ -9,7 +9,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#       python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=imagenet_vit_large
+#       python -m super_gradients.train_from_recipe --config-name=imagenet_vit_large
 
 
 
 
 defaults:
 defaults:
Discard
@@ -3,7 +3,7 @@
 # `dataset_name` refers to the official name of the dataset.
 # `dataset_name` refers to the official name of the dataset.
 # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
 # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
 #
 #
-# Example: python train_from_recipe.py --config-name=roboflow_ppyoloe dataset_name=digits-t2eg6
+# Example: python -m super_gradients.train_from_recipe --config-name=roboflow_ppyoloe dataset_name=digits-t2eg6
 
 
 
 
 defaults:
 defaults:
Discard
@@ -3,7 +3,7 @@
 # `dataset_name` refers to the official name of the dataset.
 # `dataset_name` refers to the official name of the dataset.
 # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
 # You can find it in the url of the dataset: https://universe.roboflow.com/roboflow-100/digits-t2eg6 -> digits-t2eg6
 #
 #
-# Example: python train_from_recipe.py --config-name=roboflow_yolox dataset_name=digits-t2eg6
+# Example: python -m super_gradients.train_from_recipe --config-name=roboflow_yolox dataset_name=digits-t2eg6
 
 
 defaults:
 defaults:
   - training_hyperparams: coco2017_yolox_train_params
   - training_hyperparams: coco2017_yolox_train_params
Discard
@@ -4,7 +4,7 @@
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   0. Make sure that the data is stored in dataset_params.dataset_dir or add "dataset_params.data_dir=<PATH-TO-DATASET>" at the end of the command below (feel free to check ReadMe)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   1. Move to the project root (where you will find the ReadMe and src folder)
 #   2. Run the command:
 #   2. Run the command:
-#      UNet:        python src/super_gradients/examples/train_from_recipe_example/train_from_recipe.py --config-name=supervisely_unet
+#      UNet:        python -m super_gradients.train_from_recipe --config-name=supervisely_unet
 #
 #
 # Validation Target (Person class) IoU and training time:
 # Validation Target (Person class) IoU and training time:
 #      UNet:        input-size: [480, 320]     mIoU: 89.18     1 X RTX A5000, 4 H
 #      UNet:        input-size: [480, 320]     mIoU: 89.18     1 X RTX A5000, 4 H
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  1. """
  2. Example code for resuming SuperGradient's recipes.
  3. General use: python -m super_gradients.resume_experiment --experiment_name=resnet18_cifar
  4. """
  5. from super_gradients import Trainer, init_trainer
  6. from super_gradients.common.environment.argparse_utils import pop_arg
  7. def main() -> None:
  8. init_trainer()
  9. experiment_name = pop_arg("experiment_name")
  10. ckpt_root_dir = pop_arg("ckpt_root_dir")
  11. Trainer.resume_experiment(experiment_name=experiment_name, ckpt_root_dir=ckpt_root_dir)
  12. if __name__ == "__main__":
  13. main()
Discard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  1. """
  2. Example code for running SuperGradient's recipes.
  3. General use: python -m super_gradients.train_from_kd_recipe --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. from omegaconf import DictConfig
  7. import hydra
  8. from super_gradients import init_trainer
  9. from super_gradients.training.kd_trainer import KDTrainer
  10. @hydra.main(config_path="recipes", version_base="1.2")
  11. def _main(cfg: DictConfig) -> None:
  12. KDTrainer.train_from_config(cfg)
  13. def main() -> None:
  14. init_trainer() # `init_trainer` needs to be called before `@hydra.main`
  15. _main()
  16. if __name__ == "__main__":
  17. main()
Discard
@@ -7,20 +7,19 @@ For recipe's specific instructions and details refer to the recipe's configurati
 
 
 from omegaconf import DictConfig
 from omegaconf import DictConfig
 import hydra
 import hydra
-import pkg_resources
 
 
 from super_gradients import Trainer, init_trainer
 from super_gradients import Trainer, init_trainer
 
 
 
 
-@hydra.main(config_path=pkg_resources.resource_filename("super_gradients.recipes", ""), version_base="1.2")
-def main(cfg: DictConfig) -> None:
+@hydra.main(config_path="recipes", version_base="1.2")
+def _main(cfg: DictConfig) -> None:
     Trainer.train_from_config(cfg)
     Trainer.train_from_config(cfg)
 
 
 
 
-def run():
-    init_trainer()
-    main()
+def main() -> None:
+    init_trainer()  # `init_trainer` needs to be called before `@hydra.main`
+    _main()
 
 
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
-    run()
+    main()
Discard
Discard