neptune记录训练过程 kaggle添加验证信息等

Published on Aug. 22, 2023, 12:09 p.m.

2021-06-16 记事

Neptune 记录训练日志


from pytorch\_lightning import Trainer
from pytorch\_lightning.loggers import NeptuneLogger
from kaggle\_secrets import UserSecretsClient
user\_secrets = UserSecretsClient()
secret\_value\_0 = user\_secrets.get\_secret("neptune\_api\_key")


We are using an api\_key for the anonymous user "neptuner" but you can use your own.
====================================================================================


neptune\_logger = NeptuneLogger(
 api\_key=secret\_value\_0,
 project\_name='bart/seq2seq百度知识数据notebook176d5104e8',


experiment\_name='default', # Optional,
=======================================


params={'max\_epochs': 10}, # Optional,
=======================================


tags=['pytorch-lightning', 'mlp'] # Optional,
=============================================


)


trainer = Trainer(max\_epochs=10, logger=neptune\_logger)


https://pytorch-lightning.readthedocs.io/en/latest/api/pytorch_lightning.loggers.neptune.html?highlight=logger#pytorch_lightning.loggers.neptune.NeptuneLogger

kaggle添加验证信息等

import wandb
 from kaggle\_secrets import UserSecretsClient
 user\_secrets = UserSecretsClient() 


personal\_key\_for\_api = user\_secrets.get\_secret("wandb-key")


! wandb login $personal\_key\_for\_api


https://github.com/ultralytics/yolov5/issues/1372

取消yum代理



vim /etc/yum.conf
yum-config-manager --disable upcentos7


centos安装docker

https://docs.docker.com/engine/install/centos/
示例

 183 yum update
 184 yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
 185 yum install -y yum-utils
 186 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
 187 yum install docker-ce docker-ce-cli containerd.io
 190 systemctl start docker
 191 docker ps -a


安装elasticsearch

https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

 193 docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.13.2
 196 docker start 0aa8b42a42e3
 197 docker ps
 198 curl 127.0.0.1:9200


Tags: