log_config = dict(
interval=50,
hooks=[
dict(type='MlflowLoggerHook', exp_name=EXP_NAME),
dict(type='TextLoggerHook'),
dict(type='WandbLoggerHook',
init_kwargs={
'entity': ENTITY_NAME,
'project': PROJECT_NAME,
'name': EXP_NAME
})
])
config file 하단에 log configuration을 추가해준다.
MLFlow, terminal, wandb 세 곳에 logging 한다. 아래 installation을 해주고 train.py을 실행하면 된다.
pip install mlflow
pip install wandb
wandb login
MLFlow는 "mlflow ui"를 새로운 terminal 창에 실행시켜 localhost:3000 에서 볼 수 있다.
이유는 모르겠지만 --host 0.0.0.0 --port PORT_NUM argument 넘겨주었을 때 localhost에 접속이 되지 않았다.
wandb는 weight&bias에 로그인 한 후 PROJECT_NAME 프로젝트로 들어가면 visualization을 볼 수 있다.
아래는 validation 기록이다.
'환경설정+Terminal' 카테고리의 다른 글
[Anaconda] CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. (0) | 2022.02.28 |
---|---|
[Python] Import Excel File using Pandas Dataframe (0) | 2022.01.23 |
Terminal Commands (0) | 2022.01.23 |
[Anaconda/torch] AttributeError: module 'torch.jit' has no attribute 'unused' (0) | 2022.01.23 |