From da7d6c52557694723b1b9d72123d7bc3132086a9 Mon Sep 17 00:00:00 2001 From: dberenbaum Date: Fri, 24 Mar 2023 13:14:52 -0400 Subject: [PATCH 1/4] update dvclive api url --- .../plugins/gatsby-remark-dvc-linker/liveLinker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/liveLinker.js b/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/liveLinker.js index 2b5c4fe1..2dd2715e 100644 --- a/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/liveLinker.js +++ b/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/liveLinker.js @@ -5,7 +5,7 @@ const { getItemByPath } = require('../../src/utils/shared/sidebar') const LIVE_API_REGEXP = /Live.([a-z-._]*\(\)$)?/ const METHOD_REGEXP = /^[a-z-._]*\(\)$/ -const API_ROOT = '/doc/dvclive/api-reference/live/' +const API_ROOT = '/doc/dvclive/live/' module.exports = astNode => { const node = astNode[0] From 91f1bfd705dfa0ca437254a8a4c09f027cbab1d7 Mon Sep 17 00:00:00 2001 From: dberenbaum Date: Fri, 24 Mar 2023 13:30:35 -0400 Subject: [PATCH 2/4] update dvclive api url test --- .../plugins/gatsby-remark-dvc-linker/index.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/index.test.js b/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/index.test.js index 6aba724f..e93cc772 100644 --- a/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/index.test.js +++ b/packages/gatsby-theme-iterative/plugins/gatsby-remark-dvc-linker/index.test.js @@ -27,7 +27,7 @@ describe('gatsby-remark-dvc-linker', async () => { live = { inlineCode: '`Live.log()`', - url: '[`Live.log()`](/doc/dvclive/api-reference/live/log)' + url: '[`Live.log()`](/doc/dvclive/live/log)' } it('composes apiLinker and commandLinker', () => { From e56522f3d945020cb02e704fef6d6301332bd9a0 Mon Sep 17 00:00:00 2001 From: dberenbaum Date: Fri, 24 Mar 2023 13:46:00 -0400 Subject: [PATCH 3/4] update example to use new dvclive api url --- .../example/content/docs/dvclive/api-reference/index.md | 2 +- packages/example/content/docs/dvclive/dvclive-with-dvc.md | 6 +++--- packages/example/content/docs/dvclive/get-started.md | 2 +- packages/example/content/docs/dvclive/index.md | 2 +- .../docs/dvclive/{api-reference => }/live/get_step.md | 0 .../content/docs/dvclive/{api-reference => }/live/index.md | 2 +- .../content/docs/dvclive/{api-reference => }/live/log.md | 0 .../docs/dvclive/{api-reference => }/live/log_image.md | 0 .../docs/dvclive/{api-reference => }/live/log_plot.md | 0 .../docs/dvclive/{api-reference => }/live/next_step.md | 0 .../docs/dvclive/{api-reference => }/live/set_step.md | 2 +- .../example/content/docs/dvclive/ml-frameworks/catalyst.md | 4 ++-- .../example/content/docs/dvclive/ml-frameworks/fastai.md | 4 ++-- .../content/docs/dvclive/ml-frameworks/huggingface.md | 4 ++-- .../example/content/docs/dvclive/ml-frameworks/keras.md | 4 ++-- .../example/content/docs/dvclive/ml-frameworks/lightgbm.md | 4 ++-- packages/example/content/docs/dvclive/ml-frameworks/mmcv.md | 4 ++-- .../content/docs/dvclive/ml-frameworks/pytorch-lightning.md | 6 +++--- .../example/content/docs/dvclive/ml-frameworks/xgboost.md | 4 ++-- 19 files changed, 25 insertions(+), 25 deletions(-) rename packages/example/content/docs/dvclive/{api-reference => }/live/get_step.md (100%) rename packages/example/content/docs/dvclive/{api-reference => }/live/index.md (96%) rename packages/example/content/docs/dvclive/{api-reference => }/live/log.md (100%) rename packages/example/content/docs/dvclive/{api-reference => }/live/log_image.md (100%) rename packages/example/content/docs/dvclive/{api-reference => }/live/log_plot.md (100%) rename packages/example/content/docs/dvclive/{api-reference => }/live/next_step.md (100%) rename packages/example/content/docs/dvclive/{api-reference => }/live/set_step.md (94%) diff --git a/packages/example/content/docs/dvclive/api-reference/index.md b/packages/example/content/docs/dvclive/api-reference/index.md index fb6427da..097f981a 100644 --- a/packages/example/content/docs/dvclive/api-reference/index.md +++ b/packages/example/content/docs/dvclive/api-reference/index.md @@ -8,4 +8,4 @@ from dvclive import Live ``` Will import the main class of the API: -[`Live()`](/doc/dvclive/api-reference/live). +[`Live()`](/doc/dvclive/live). diff --git a/packages/example/content/docs/dvclive/dvclive-with-dvc.md b/packages/example/content/docs/dvclive/dvclive-with-dvc.md index 6837e160..09042aa2 100644 --- a/packages/example/content/docs/dvclive/dvclive-with-dvc.md +++ b/packages/example/content/docs/dvclive/dvclive-with-dvc.md @@ -90,12 +90,12 @@ $ tree └── train.py ``` -The [metrics summary](/doc/dvclive/api-reference/live/log#description) +The [metrics summary](/doc/dvclive/live/log#description) `training_metrics.json` can be used by `dvc metrics` and visualized with `dvc exp show`/`dvc exp diff`. In addition, the -[metrics history](/doc/dvclive/api-reference/live/log#step-updates) generated +[metrics history](/doc/dvclive/live/log#step-updates) generated under `training_metrics/scalars` can be visualized with `dvc plots`. ### Iterative Studio @@ -128,7 +128,7 @@ When used alongside DVC, DVCLive can create _checkpoint_ signal files used by DVC experiments. This will save all the outputs (metrics, plots, models, etc.) associated to each -[`step`](/doc/dvclive/api-reference/live/get_step). +[`step`](/doc/dvclive/live/get_step). You can learn more about how to use them in the [Checkpoints User Guide](/docs/user-guide/experiment-management/checkpoints). diff --git a/packages/example/content/docs/dvclive/get-started.md b/packages/example/content/docs/dvclive/get-started.md index 5952cc59..50ad7fdd 100644 --- a/packages/example/content/docs/dvclive/get-started.md +++ b/packages/example/content/docs/dvclive/get-started.md @@ -20,7 +20,7 @@ from dvclive import Live live = Live() ``` -See [`Live()`](/doc/dvclive/api-reference/live) for details. +See [`Live()`](/doc/dvclive/live) for details. ### Log data diff --git a/packages/example/content/docs/dvclive/index.md b/packages/example/content/docs/dvclive/index.md index 1881adc2..480b2bb6 100644 --- a/packages/example/content/docs/dvclive/index.md +++ b/packages/example/content/docs/dvclive/index.md @@ -19,7 +19,7 @@ fully compatible with DVC. You can Use DVCLive alonside your favorite ML Framework - + See details of all DVCLive's functions diff --git a/packages/example/content/docs/dvclive/api-reference/live/get_step.md b/packages/example/content/docs/dvclive/live/get_step.md similarity index 100% rename from packages/example/content/docs/dvclive/api-reference/live/get_step.md rename to packages/example/content/docs/dvclive/live/get_step.md diff --git a/packages/example/content/docs/dvclive/api-reference/live/index.md b/packages/example/content/docs/dvclive/live/index.md similarity index 96% rename from packages/example/content/docs/dvclive/api-reference/live/index.md rename to packages/example/content/docs/dvclive/live/index.md index 2a42c9a4..852caf8c 100644 --- a/packages/example/content/docs/dvclive/api-reference/live/index.md +++ b/packages/example/content/docs/dvclive/live/index.md @@ -37,7 +37,7 @@ other metadata. - `dir` - Location of the directory to store [outputs](/doc/dvclive/get-started#outputs). - `summary_path` - Location of the - [summary](/doc/dvclive/api-reference/live/#parameters). + [summary](/doc/dvclive/live/#parameters). - `html_path` - Location of the [html report](/doc/dvclive/dvclive-with-dvc#html-report). diff --git a/packages/example/content/docs/dvclive/api-reference/live/log.md b/packages/example/content/docs/dvclive/live/log.md similarity index 100% rename from packages/example/content/docs/dvclive/api-reference/live/log.md rename to packages/example/content/docs/dvclive/live/log.md diff --git a/packages/example/content/docs/dvclive/api-reference/live/log_image.md b/packages/example/content/docs/dvclive/live/log_image.md similarity index 100% rename from packages/example/content/docs/dvclive/api-reference/live/log_image.md rename to packages/example/content/docs/dvclive/live/log_image.md diff --git a/packages/example/content/docs/dvclive/api-reference/live/log_plot.md b/packages/example/content/docs/dvclive/live/log_plot.md similarity index 100% rename from packages/example/content/docs/dvclive/api-reference/live/log_plot.md rename to packages/example/content/docs/dvclive/live/log_plot.md diff --git a/packages/example/content/docs/dvclive/api-reference/live/next_step.md b/packages/example/content/docs/dvclive/live/next_step.md similarity index 100% rename from packages/example/content/docs/dvclive/api-reference/live/next_step.md rename to packages/example/content/docs/dvclive/live/next_step.md diff --git a/packages/example/content/docs/dvclive/api-reference/live/set_step.md b/packages/example/content/docs/dvclive/live/set_step.md similarity index 94% rename from packages/example/content/docs/dvclive/api-reference/live/set_step.md rename to packages/example/content/docs/dvclive/live/set_step.md index be212d2c..2baf42fe 100644 --- a/packages/example/content/docs/dvclive/api-reference/live/set_step.md +++ b/packages/example/content/docs/dvclive/live/set_step.md @@ -47,7 +47,7 @@ the pipeline, `DVC` will ## Example Given the [Usage](#usage) code snippet above, the -[metrics history](/doc/dvclive/api-reference/live/log#step-updates) generated +[metrics history](/doc/dvclive/live/log#step-updates) generated for `metric_1` would be: ```dvc diff --git a/packages/example/content/docs/dvclive/ml-frameworks/catalyst.md b/packages/example/content/docs/dvclive/ml-frameworks/catalyst.md index 90ab2b6a..c51d763a 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/catalyst.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/catalyst.md @@ -45,7 +45,7 @@ more info. be saved at the end of each `step`. - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples @@ -63,7 +63,7 @@ runner.train( callbacks=[DvcLiveCallback(model_file="model.pth")]) ``` -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python from dvclive.catalyst import DvcLiveCallback diff --git a/packages/example/content/docs/dvclive/ml-frameworks/fastai.md b/packages/example/content/docs/dvclive/ml-frameworks/fastai.md index 5a310371..9358777d 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/fastai.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/fastai.md @@ -42,7 +42,7 @@ more info. be saved at the end of each `step`. - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples @@ -57,7 +57,7 @@ learn.fit_one_cycle( cbs=[DvcLiveCallback(model_file="model.pth")]) ``` -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python from dvclive.fastai import DvcLiveCallback diff --git a/packages/example/content/docs/dvclive/ml-frameworks/huggingface.md b/packages/example/content/docs/dvclive/ml-frameworks/huggingface.md index b71a490a..2a74446e 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/huggingface.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/huggingface.md @@ -47,7 +47,7 @@ more info. be saved at the end of each `step`. - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples @@ -69,7 +69,7 @@ trainer.add_callback( trainer.train() ``` -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python from dvclive.huggingface import DvcLiveCallback diff --git a/packages/example/content/docs/dvclive/ml-frameworks/keras.md b/packages/example/content/docs/dvclive/ml-frameworks/keras.md index d05eaaa6..c33d6f31 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/keras.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/keras.md @@ -47,7 +47,7 @@ more info. is saved (`model.save(model_file)`) - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples @@ -65,7 +65,7 @@ model.fit( save_weights_only=True)]) ``` -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python from dvclive.keras import DvcLiveCallback diff --git a/packages/example/content/docs/dvclive/ml-frameworks/lightgbm.md b/packages/example/content/docs/dvclive/ml-frameworks/lightgbm.md index a12e872c..e0bf29e7 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/lightgbm.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/lightgbm.md @@ -43,7 +43,7 @@ more info. be saved at the end of each `step`. - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples @@ -58,7 +58,7 @@ lightgbm.train( callbacks=[DvcLiveCallback(model_file="lgbm_model.txt")]) ``` -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python lightgbm.train( diff --git a/packages/example/content/docs/dvclive/ml-frameworks/mmcv.md b/packages/example/content/docs/dvclive/ml-frameworks/mmcv.md index 31483378..592bd4e6 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/mmcv.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/mmcv.md @@ -38,7 +38,7 @@ more info. be saved at the end of each `step`. - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples @@ -54,7 +54,7 @@ log_config = dict( ) ``` -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python log_config = dict( diff --git a/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md b/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md index 497530fa..2fac5fed 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md @@ -44,15 +44,15 @@ more info. - `prefix` - (`None` by default) - string that adds to each metric name. - `experiment` - (`None` by default) - - [`Live`](/docs/dvclive/api-reference/live) object to be used instead of + [`Live`](/docs/dvclive/live) object to be used instead of initializing a new one. - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python from dvclive.lightning import DvcLiveLogger diff --git a/packages/example/content/docs/dvclive/ml-frameworks/xgboost.md b/packages/example/content/docs/dvclive/ml-frameworks/xgboost.md index cafb6951..024ad149 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/xgboost.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/xgboost.md @@ -43,11 +43,11 @@ more info. be saved at the end of each `step`. - `**kwargs` - Any additional arguments will be passed to - [`Live`](/docs/dvclive/api-reference/live). + [`Live`](/docs/dvclive/live). ## Examples -- Using `**kwargs` to customize [`Live`](/docs/dvclive/api-reference/live). +- Using `**kwargs` to customize [`Live`](/docs/dvclive/live). ```python xgboost.train( From 6d50a8abdaf5730d51c8e6dfadd905c72871946b Mon Sep 17 00:00:00 2001 From: dberenbaum Date: Fri, 24 Mar 2023 14:16:25 -0400 Subject: [PATCH 4/4] run formatter --- .../example/content/docs/dvclive/api-reference/index.md | 3 +-- packages/example/content/docs/dvclive/dvclive-with-dvc.md | 8 +++----- packages/example/content/docs/dvclive/live/index.md | 3 +-- packages/example/content/docs/dvclive/live/set_step.md | 4 ++-- .../docs/dvclive/ml-frameworks/pytorch-lightning.md | 5 ++--- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/packages/example/content/docs/dvclive/api-reference/index.md b/packages/example/content/docs/dvclive/api-reference/index.md index 097f981a..19ae0c41 100644 --- a/packages/example/content/docs/dvclive/api-reference/index.md +++ b/packages/example/content/docs/dvclive/api-reference/index.md @@ -7,5 +7,4 @@ can be imported regularly, for example: from dvclive import Live ``` -Will import the main class of the API: -[`Live()`](/doc/dvclive/live). +Will import the main class of the API: [`Live()`](/doc/dvclive/live). diff --git a/packages/example/content/docs/dvclive/dvclive-with-dvc.md b/packages/example/content/docs/dvclive/dvclive-with-dvc.md index 09042aa2..37fc1c9f 100644 --- a/packages/example/content/docs/dvclive/dvclive-with-dvc.md +++ b/packages/example/content/docs/dvclive/dvclive-with-dvc.md @@ -90,12 +90,10 @@ $ tree └── train.py ``` -The [metrics summary](/doc/dvclive/live/log#description) -`training_metrics.json` can be used by `dvc metrics` and visualized with -`dvc exp show`/`dvc exp diff`. +The [metrics summary](/doc/dvclive/live/log#description) `training_metrics.json` +can be used by `dvc metrics` and visualized with `dvc exp show`/`dvc exp diff`. -In addition, the -[metrics history](/doc/dvclive/live/log#step-updates) generated +In addition, the [metrics history](/doc/dvclive/live/log#step-updates) generated under `training_metrics/scalars` can be visualized with `dvc plots`. ### Iterative Studio diff --git a/packages/example/content/docs/dvclive/live/index.md b/packages/example/content/docs/dvclive/live/index.md index 852caf8c..265e0e5d 100644 --- a/packages/example/content/docs/dvclive/live/index.md +++ b/packages/example/content/docs/dvclive/live/index.md @@ -36,8 +36,7 @@ other metadata. - `dir` - Location of the directory to store [outputs](/doc/dvclive/get-started#outputs). -- `summary_path` - Location of the - [summary](/doc/dvclive/live/#parameters). +- `summary_path` - Location of the [summary](/doc/dvclive/live/#parameters). - `html_path` - Location of the [html report](/doc/dvclive/dvclive-with-dvc#html-report). diff --git a/packages/example/content/docs/dvclive/live/set_step.md b/packages/example/content/docs/dvclive/live/set_step.md index 2baf42fe..43d8c2f7 100644 --- a/packages/example/content/docs/dvclive/live/set_step.md +++ b/packages/example/content/docs/dvclive/live/set_step.md @@ -47,8 +47,8 @@ the pipeline, `DVC` will ## Example Given the [Usage](#usage) code snippet above, the -[metrics history](/doc/dvclive/live/log#step-updates) generated -for `metric_1` would be: +[metrics history](/doc/dvclive/live/log#step-updates) generated for `metric_1` +would be: ```dvc $ cat dvclive/metric_1.tsv diff --git a/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md b/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md index 2fac5fed..3457afc1 100644 --- a/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md +++ b/packages/example/content/docs/dvclive/ml-frameworks/pytorch-lightning.md @@ -43,9 +43,8 @@ more info. - `prefix` - (`None` by default) - string that adds to each metric name. -- `experiment` - (`None` by default) - - [`Live`](/docs/dvclive/live) object to be used instead of - initializing a new one. +- `experiment` - (`None` by default) - [`Live`](/docs/dvclive/live) object to be + used instead of initializing a new one. - `**kwargs` - Any additional arguments will be passed to [`Live`](/docs/dvclive/live).