Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wandb config added to docs #1853

Open
wants to merge 4 commits into
base: 0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/tutorials/1_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,13 @@ We incorporate modular design into our config system, which is convenient to con
interval=1, save_best='[email protected]') # Interval to perform evaluation and the key for saving best checkpoint
log_config = dict( # Config to register logger hook
interval=20, # Interval to print the log
hooks=[ # Hooks to be implemented during training
dict(type='TextLoggerHook'), # The logger used to record the training process
])
hooks=[ # Hooks to be implemented during training
dict(type='TextLoggerHook', by_epoch=False),
dict(type='TensorboardLoggerHook', by_epoch=False),
dict(type='WandbLoggerHook', by_epoch=False,
init_kwargs={'entity': entity, 'project': project, 'config': cfg_dict}), # The Wandb logger is also supported, It requires `wandb` to be installed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to define project and cfg_dict? Thanks

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's simple. project is the project name in WandB.ai, and the entity is the user entity/name in WandB.ai. I'll make a few changes to provide better docs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, cfg_dict is a dictionary containing parameters we need to log into WandB.

# ClearMLLoggerHook, DvcliveLoggerHook, MlflowLoggerHook, NeptuneLoggerHook, PaviLoggerHook, SegmindLoggerHook are also supported based on MMCV implementation.
])

# runtime settings
dist_params = dict(backend='nccl') # Parameters to setup distributed training, the port can also be set
Expand Down
10 changes: 6 additions & 4 deletions docs_zh_CN/tutorials/1_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,12 @@ MMAction2 将模块化设计整合到配置文件系统中,以便执行各类
save_best='top_k_accuracy') # 设置 `top_k_accuracy` 作为指示器,用于存储最好的模型权重文件
log_config = dict( # 注册日志钩子的设置
interval=20, # 打印日志间隔
hooks=[ # 训练期间执行的钩子
dict(type='TextLoggerHook'), # 记录训练过程信息的日志
# dict(type='TensorboardLoggerHook'), # 同时支持 Tensorboard 日志
])
hooks=[ # 训练期间执行的钩子
dict(type='TextLoggerHook', by_epoch=False),
dict(type='TensorboardLoggerHook', by_epoch=False),
dict(type='WandbLoggerHook', by_epoch=False,
init_kwargs={'entity': entity, 'project': project, 'config': cfg_dict}), # 同样支持 Wandb 日志
])

# 运行设置
dist_params = dict(backend='nccl') # 建立分布式训练的设置,其中端口号也可以设置
Expand Down