Skip to content

Commit

Permalink
[Docs] Add a image for neptune (#1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida authored Aug 18, 2023
1 parent 43e308c commit 03ad86c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
10 changes: 6 additions & 4 deletions docs/en/common_usage/visualize_training_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Below, we'll show you how to configure an experiment management tool in just one

## TensorBoard

Configure the `visualizer` in the initialization parameters of the Runner, and set `vis_backends` to `TensorboardVisBackend`.
Configure the `visualizer` in the initialization parameters of the Runner, and set `vis_backends` to [TensorboardVisBackend](mmengine.visualization.TensorboardVisBackend).

```python
runner = Runner(
Expand All @@ -32,7 +32,7 @@ pip install wandb
wandb login
```

Configure the `visualizer` in the initialization parameters of the Runner, and set `vis_backends` to `WandbVisBackend`.
Configure the `visualizer` in the initialization parameters of the Runner, and set `vis_backends` to [WandbVisBackend](mmengine.visualization.WandbVisBackend).

```python
runner = Runner(
Expand Down Expand Up @@ -81,7 +81,7 @@ pip install clearml
clearml-init
```

Configure the `visualizer` in the initialization parameters of the Runner, and set `vis_backends` to `ClearMLVisBackend`.
Configure the `visualizer` in the initialization parameters of the Runner, and set `vis_backends` to [ClearMLVisBackend](mmengine.visualization.ClearMLVisBackend).

```python
runner = Runner(
Expand All @@ -108,7 +108,7 @@ Before using Neptune, you need to install `neptune` dependency library and refer
pip install neptune
```

Configure the `Runner` in the initialization parameters of the Runner, and set `vis_backends` to `NeptuneVisBackend`.
Configure the `Runner` in the initialization parameters of the Runner, and set `vis_backends` to [NeptuneVisBackend](mmengine.visualization.NeptuneVisBackend).

```python
runner = Runner(
Expand All @@ -125,6 +125,8 @@ runner = Runner(
runner.train()
```

![image](https://github.com/open-mmlab/mmengine/assets/58739961/9122e2ac-cc4f-43b2-bad3-ae33faa64043)

Please note: If the `project` and `api_token` are not specified, neptune will be set to offline mode and the generated files will be saved to the local `.neptune` file.
It is recommended to specify the `project` and `api_token` during initialization as shown below.

Expand Down
14 changes: 8 additions & 6 deletions docs/zh_cn/common_usage/visualize_training_log.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 可视化训练日志

MMEngine 集成了 [TensorBoard](https://www.tensorflow.org/tensorboard?hl=zh-cn)[Weights & Biases (WandB)](https://docs.wandb.ai/)[MLflow](https://mlflow.org/docs/latest/index.html) [ClearML](https://clear.ml/docs/latest/docs)[Neptune](https://docs.neptune.ai/)实验管理工具,你可以很方便地跟踪和可视化损失及准确率等指标。
MMEngine 集成了 [TensorBoard](https://www.tensorflow.org/tensorboard?hl=zh-cn)[Weights & Biases (WandB)](https://docs.wandb.ai/)[MLflow](https://mlflow.org/docs/latest/index.html)[ClearML](https://clear.ml/docs/latest/docs)[Neptune](https://docs.neptune.ai/) 实验管理工具,你可以很方便地跟踪和可视化损失及准确率等指标。

下面基于[15 分钟上手 MMENGINE](../get_started/15_minutes.md)中的例子介绍如何一行配置实验管理工具。

## TensorBoard

设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 `TensorboardVisBackend`
设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 [TensorboardVisBackend](mmengine.visualization.TensorboardVisBackend)

```python
runner = Runner(
Expand All @@ -32,7 +32,7 @@ pip install wandb
wandb login
```

设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 `WandbVisBackend`
设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 [WandbVisBackend](mmengine.visualization.WandbVisBackend)

```python
runner = Runner(
Expand Down Expand Up @@ -81,7 +81,7 @@ pip install clearml
clearml-init
```

设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 `ClearMLVisBackend`
设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 [ClearMLVisBackend](mmengine.visualization.ClearMLVisBackend)

```python
runner = Runner(
Expand All @@ -108,7 +108,7 @@ runner.train()
pip install neptune
```

设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 `NeptuneVisBackend`
设置 `Runner` 初始化参数中的 `visualizer`,并将 `vis_backends` 设置为 [NeptuneVisBackend](mmengine.visualization.NeptuneVisBackend)

```python
runner = Runner(
Expand All @@ -125,7 +125,9 @@ runner = Runner(
runner.train()
```

请注意:若未提供 `project``api_token` ,neptune 将被设置成离线模式,产生的文件将保存到本地`.neptune`文件下。
![image](https://github.com/open-mmlab/mmengine/assets/58739961/9122e2ac-cc4f-43b2-bad3-ae33faa64043)

请注意:若未提供 `project``api_token` ,neptune 将被设置成离线模式,产生的文件将保存到本地 `.neptune` 文件下。
推荐在初始化时提供 `project``api_token` ,具体方法如下所示:

```python
Expand Down
5 changes: 4 additions & 1 deletion mmengine/visualization/vis_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,9 @@ class NeptuneVisBackend(BaseVisBackend):
>>> cfg = Config(dict(a=1, b=dict(b1=[0, 1])))
>>> neptune_vis_backend.add_config(cfg)
Note:
`New in version 0.8.5.`
Args:
save_dir (str, optional): The root directory to save the files
produced by the visualizer. NeptuneVisBackend does
Expand All @@ -1016,7 +1019,7 @@ class NeptuneVisBackend(BaseVisBackend):
`namespace/project_name`. If `project` is not specified,
the value of `NEPTUNE_PROJECT` environment variable
will be taken.
- api_token (str): Users API token. If api_token is not api_token,
- api_token (str): User's API token. If api_token is not api_token,
the value of `NEPTUNE_API_TOKEN` environment variable will
be taken. Note: It is strongly recommended to use
`NEPTUNE_API_TOKEN` environment variable rather than
Expand Down

0 comments on commit 03ad86c

Please sign in to comment.