Log full output not just training progress. #529
-
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Hello, thanks for your reporting. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
could you provide your mmcv version and your command to start training? |
Beta Was this translation helpful? Give feedback.
-
MMCV version is 1.6.1. Training is done by a custom script, but the main steps are: ...
# parse some args
...
# load config
cfg = Config.fromfile("...")
...
# create work_dir
cfg.work_dir = "../logs/{}".format(setting)
# set random seed
cfg.seed = 0
set_random_seed(0, deterministic=False)
# create the work directory
mmcv.mkdir_or_exist(osp.abspath(cfg.work_dir))
# set device and gpu
cfg.device = "cuda"
cfg.gpu_ids = range(num_gpus)
# build the algorithm
model = build_algorithm(cfg.model)
# init weights
model.init_weights()
# build the dataset
datasets = [build_dataset(cfg.data.train)]
# start pre-train
train_model(
model,
datasets,
cfg,
distributed=True if num_gpus > 1 else False,
timestamp=time.strftime("%Y%m%d_%H%M%S", time.localtime()),
meta=dict(),
) |
Beta Was this translation helpful? Give feedback.
-
Additional info: I am using mmsegmentation as well in another project, and the same issue appears there, only these logs are present in the mentioned directories, nothing similar to what you showed me. Could there be some kind of environment related issue? Both projects are running in docker containers. |
Beta Was this translation helpful? Give feedback.
-
How did you write your |
Beta Was this translation helpful? Give feedback.
-
My model inherits from BaseModule as well. In MMSegmentation my models inherit from BaseSegmentor https://github.com/open-mmlab/mmsegmentation/blob/dd42fa8d0125632371a41a87c20485494c973535/mmseg/models/segmentors/base.py#L13, so they also should inherit from BaseModule as well.
|
Beta Was this translation helpful? Give feedback.
-
you can try initializing logger before |
Beta Was this translation helpful? Give feedback.
-
That solved the problem! Thanks!! |
Beta Was this translation helpful? Give feedback.
you can try initializing logger before
build_model
, like this https://github.com/open-mmlab/mmselfsup/blob/master/tools/train.py#L150