This commit is contained in:
2024-09-13 16:58:34 +08:00
commit b06a9ecee0
103 changed files with 5440 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
template = """from PytorchBoot.application import PytorchBootApplication
@PytorchBootApplication
class Application:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
"""

View File

@@ -0,0 +1,58 @@
template = """
runners:
general:
seed: 0
device: cuda
cuda_visible_devices: "0,1,2,3,4,5,6,7"
parallel: False
experiment:
name: experiment_name
root_dir: "experiments"
use_checkpoint: False
epoch: -1 # -1 stands for last epoch
max_epochs: 5000
save_checkpoint_interval: 1
test_first: True
train:
optimizer:
type: adam
lr: 0.0001
losses: # loss type : weight
loss_type_0: 1.0
dataset:
name: train_set_name
source: train_set_source_name
ratio: 1.0
batch_size: 1
num_workers: 1
test:
frequency: 3 # test frequency
dataset_list:
- name: test_set_name_0
source: train_set_source_name
eval_list:
- eval_func_name_0
- eval_func_name_1
ratio: 1.0
batch_size: 1
num_workers: 1
pipeline: pipeline_name
pipelines:
pipeline_name_0:
- module_name_0
- module_name_1
datasets:
dataset_source_name_0:
dataset_source_name_1:
modules:
module_name_0:
module_name_1:
"""