![]() It is user's responsibility to provide the script file that canĬonsume given configuration file. No restrictions are applied on the configuration file. Additionally,Īrgument kwargs contains logger (e.g. The only condition on the script file is it should contain run(config, **kwargs) callable method. Python -m special_launcher `py_config_runner_script ` scripts/training.py configs/train/baseline.py Or if your specific launcher requires only python script files: cd /path/to/my/project Python -u -m py_config_runner scripts/training.py configs/train/baseline.py Py_config_runner scripts/training.py configs/train/baseline.py output_path = "/tmp/output" training ( config ) With launcher cd /path/to/my/project Task's meta-data are better described in a declarative way, but often you want to create this meta-data programmatically. python powered doit uses plain python to define tasks. validate ( config ) # Add more things at runtime config. Task Runner doit allows you to easily define ad-hoc tasks, helping you to organize all your project related tasks in an unified easy-to-use & discoverable way. train_loader )) def main (): config_filepath = "/path/to/config.py" config = ConfigObject ( config_filepath ) SSLTrainvalConfigSchema. training.py): from import DataLoader from py_config_runner import ConfigObject, TrainvalConfigSchema class SSLTrainvalConfigSchema ( TrainvalConfigSchema ): unsup_dataloader : DataLoader def training ( config ): #. config.py): num_epochs = 100 batch_size = 256 model = resnet18 ( 10 ) train_loader = get_train_loader ( "/path/to/dataset", batch_size = batch_size ) unsup_dataloader = get_train_unsup_loader ( "/path/to/unsup_dataset", batch_size = batch_size ). No need other meta-languages for the configurationĬonfiguration file (e.g.Python configuration file and command line executable to run a script with. Python Configuration and a command line Runner ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |