Default / 默认 · 9月 1, 2021

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

内容纲要

2021-06-16 记事

#Neptune 记录训练日志

“`python
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添加验证信息等

“`python
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

“`

%d 博主赞过: