Modalities / modalities

Modalities, a PyTorch-native framework for distributed and reproducible foundation model training.
MIT License
61 stars 5 forks source link

Issues with Main #61

Open flxst opened 7 months ago

flxst commented 7 months ago

There are a few minor issues with the main file __main__.py and the class Main:

  1. In __main__.py, the CLI entry point functions contain very few lines of code using certain classes (or functions). However, unlike other classes, the Main class used for the CLI command run is not imported from another module, but defined in the module __main__.py itself. We should consider moving it to a separate module in order to be consistent and keep the entry point logic separate from the execution logic.
  2. If modalities is used as a package, the Main class has to be imported by from modalities.__main__ import Main. We should enable from modalities import Main.
  3. The class Main should perhaps be renamed to something more meaningful.