From 0b7e859725c0aa7a8e4178a9ef3f6d269e10ddc8 Mon Sep 17 00:00:00 2001 From: sailist Date: Fri, 10 Feb 2023 18:03:41 +0800 Subject: [PATCH] Add some doc. --- src/lumo/trainer/trainer.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/lumo/trainer/trainer.py b/src/lumo/trainer/trainer.py index e0b3d31..fdf2cff 100644 --- a/src/lumo/trainer/trainer.py +++ b/src/lumo/trainer/trainer.py @@ -32,6 +32,27 @@ class Trainer(_BaseTrainer): + """ + Trainer provides a complete training and evaluation logic to help users focus on specific training details. + It integrates logging, metric recording, experiment saving, version control, and complete callback control + of each life cycle. + + When to use lumo.Trainer: + - At the beginning of the investigation direction, there will be many code branches and experiments + based on the same set of data and models, but with different training details. + - Reproduce multiple papers in the same field, which are also based on the same dataset and evaluation logic. + + When to simply use lumo.SimpleExperiment: + - You have maintained a mature training framework yourself, but there are still certain requirements + for allocating dynamic(different) storage path and version control in each program. + + At present, I have explored best practices based on lumo in two fields, this includs: + - https://github.com/pytorch-lumo/image-classification + - https://github.com/pytorch-lumo/MMERC + + Both two reposiroties are github templates and you can use them to create you new (private) repository. + """ + callback_function = { "save_keypoint", "save_checkpoint", "save_model", "load_state_dict", 'ioptims', 'imodels', 'train', 'test', 'evaluate', 'train_epoch', 'train_step',