From 2b26d29bac01c5347c430a424bfaf3fb6588c7ab Mon Sep 17 00:00:00 2001 From: Galileo Galilei Date: Mon, 19 Oct 2020 21:14:58 +0200 Subject: [PATCH] PARTIAL #6 - Fix documentation typo with wrong reference to version --- .bumpversion.cfg | 6 ++++++ CHANGELOG.md | 11 +++++----- docs/source/01_introduction/02_motivation.md | 20 +++++++++---------- .../source/01_introduction/03_installation.md | 4 ++-- .../01_example_project.md | 2 +- .../02_hello_world_example/02_first_steps.md | 2 +- .../03_tutorial/04_version_parameters.md | 2 +- .../source/03_tutorial/05_version_datasets.md | 2 +- 8 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 53075a2a..8e85ed4a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -4,3 +4,9 @@ current_version = 0.3.0 [bumpversion:file:setup.py] [bumpversion:file:kedro_mlflow/__init__.py] +[bumpversion:file:kedro-mlflow/docs/source/01_introduction/02_motivation.md] +[bumpversion:file:kedro-mlflow/docs/source/01_introduction/03_installation.md] +[bumpversion:file:kedro-mlflow/docs/source/02_hello_world_example/01_example_project.md] +[bumpversion:file:kedro-mlflow/docs/source/02_hello_world_example/02_first_steps.md] +[bumpversion:file:kedro-mlflow/docs/source/03_tutorial/04_version_parameters.md] +[bumpversion:file:kedro-mlflow/docs/source/03_tutorial/05_version_datasets.md] diff --git a/CHANGELOG.md b/CHANGELOG.md index dfd5d1ad..1118b446 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,19 +9,20 @@ ### Fixed -- `get_mlflow_config` now uses the kedro context config_loader to get configs (#66). This indirectly solves the following issues: - - `get_mlflow_config` now works in interactive mode if `load_context` is called with a path different from the working directory (#30) +- `get_mlflow_config` now uses the Kedro `ProjectContext` `ConfigLoader` to get configs (#66). This indirectly solves the following issues: + - `get_mlflow_config` now works in interactive mode if `load_context` is called with a path different from the working directory (#30) - kedro_mlflow now works fine with kedro jupyter notebook independently of the working directory (#64) - - You can use global variables in `mlflow.yml` which is now properly parsed if you use a `TemplatedConfigLoader` (#72) + - You can use global variables in `mlflow.yml` which is now properly parsed if you use a `TemplatedConfigLoader` (#72) - `mlflow init` is now getting conf path from context.CONF_ROOT instead of hardcoded conf folder. This makes the package robust to Kedro changes. ### Changed -- `MlflowNodeHook` now has a before_pipeline_run hook which stores the ProjectContext and enable to retrieve configuration. +- `MlflowNodeHook` now has a `before_pipeline_run` hook which stores the `ProjectContext` and enable to retrieve configuration (#66). +- Documentation reference to the plugin is now dynamic when necessary (#6). ### Removed -`kedro mlflow init` command is no longer declaring hooks in `run.py`. You must now [register your hooks manually](docs/source/03_tutorial/02_setup.md#declaring-kedro-mlflow-hooks) in the ``run.py`` (kedro > 0.16.0), ``.kedro.yml`` (kedro >= 0.16.5) or ``pyproject.toml`` (kedro >= 0.16.5) +- `kedro mlflow init` command is no longer declaring hooks in `run.py`. You must now [register your hooks manually](docs/source/03_tutorial/02_setup.md#declaring-kedro-mlflow-hooks) in the ``run.py`` (kedro > 0.16.0), ``.kedro.yml`` (kedro >= 0.16.5) or ``pyproject.toml`` (kedro >= 0.16.5) ## [0.3.0] - 2020-10-11 diff --git a/docs/source/01_introduction/02_motivation.md b/docs/source/01_introduction/02_motivation.md index 1169e6a0..1d3f97be 100644 --- a/docs/source/01_introduction/02_motivation.md +++ b/docs/source/01_introduction/02_motivation.md @@ -4,7 +4,7 @@ Basically, you should use ``kedro-mlflow`` in **any ``Kedro`` project which involves machine learning** / deep learning. As stated in the [introduction](./01_introduction.md), ``Kedro``'s current versioning (as of version ``0.16.1``) is not sufficient for machine learning projects: it lacks a UI and a ``run`` management system. Besides, the ``KedroPipelineModel`` ability to serve a kedro pipeline as an API or a batch in one line of code is a great addition for collaboration and transition to production. -If you do not use ``Kedro`` or if you do pure data manipulation which do not involve machine learning, this plugin is not what you are seeking for ;) +If you do not use ``Kedro`` or if you do pure data manipulation which does not involve *machine learning*, this plugin is not what you are seeking for ;) ## Why should I use kedro-mlflow ? @@ -32,15 +32,15 @@ Above implementations have the advantage of being very straightforward and *mlfl ``kedro-mlflow`` enforces these best practices while implementing a clear interface for each mlflow action in Kedro template. Below chart maps the mlflow action to perform with the Python API provided by kedro-mlflow and the location in Kedro template where the action should be performed. -|Mlflow action |Template file |Python API | -|:----------------------------|:-----------------------|:-----------------------| -|Set up configuration |``mlflow.yml`` |``MlflowPipelineHook`` | -|Logging parameters |``run.py`` |``MlflowNodeHook`` | -|Logging artifacts |``catalog.yml`` |``MlflowArtifactDataSet`` | -|Logging models |NA |NA | -|Logging metrics |``catalog.yml`` |``MlflowMetricsDataSet``| +|Mlflow action |Template file |Python API | +|:----------------------------|:-----------------------|:-------------------------------------------------| +|Set up configuration |``mlflow.yml`` |``MlflowPipelineHook`` | +|Logging parameters |``run.py`` |``MlflowNodeHook`` | +|Logging artifacts |``catalog.yml`` |``MlflowArtifactDataSet`` | +|Logging models |NA |NA | +|Logging metrics |``catalog.yml`` |``MlflowMetricsDataSet`` | |Logging Pipeline as model |``pipeline.py`` |``KedroPipelineModel`` and ``pipeline_ml_factory``| -In the current version (``kedro_mlflow=0.2.0``), kedro-mlflow does not provide interface to log metrics, set tags or log models outside a Kedro ``Pipeline``. These decisions are subject to debate and design decisions (for instance, metrics are often updated in a loop during each epoch / training iteration and it does not always make sense to register the metric between computation steps, e.g. as a an I/O operation after a node run). +In the current version (``kedro_mlflow=0.3.0``), `kedro-mlflow` does not provide interface to set tags or log models outside a Kedro ``Pipeline``. These decisions are subject to debate and design decisions (for instance, metrics are often updated in a loop during each epoch / training iteration and it does not always make sense to register the metric between computation steps, e.g. as a an I/O operation after a node run). -_**Note:** the version ``0.2.0`` does not need any ``MLProject`` file to use mlflow inside your Kedro project. As seen in the [introduction](./01_introduction.md), this file overlaps with Kedro configuration files._ +_**Note:** the version ``0.3.0`` does not need any ``MLProject`` file to use mlflow inside your Kedro project. As seen in the [introduction](./01_introduction.md), this file overlaps with Kedro configuration files._ diff --git a/docs/source/01_introduction/03_installation.md b/docs/source/01_introduction/03_installation.md index 01196470..d298c6da 100644 --- a/docs/source/01_introduction/03_installation.md +++ b/docs/source/01_introduction/03_installation.md @@ -36,9 +36,9 @@ projects. It is developed as part of the Kedro initiative at QuantumBlack. Installed plugins: -kedro_mlflow: 0.2.0 (hooks:global,project) +kedro_mlflow: 0.3.0 (hooks:global,project) ``` -The version ``0.2.0`` of the plugin is installed and has both global and project commands. +The version ``0.3.0`` of the plugin is installed and has both global and project commands. That's it! You are now ready to go! diff --git a/docs/source/02_hello_world_example/01_example_project.md b/docs/source/02_hello_world_example/01_example_project.md index dea8a182..04699e7c 100644 --- a/docs/source/02_hello_world_example/01_example_project.md +++ b/docs/source/02_hello_world_example/01_example_project.md @@ -91,6 +91,6 @@ Install the project dependencies: ```console pip install -r src/requirements.txt -pip install --upgrade kedro-mlflow==0.2.0 +pip install --upgrade kedro-mlflow==0.3.0 ``` **Warning: Do not use ``kedro install`` commands does not seem to install the packages in your activated environment.** diff --git a/docs/source/02_hello_world_example/02_first_steps.md b/docs/source/02_hello_world_example/02_first_steps.md index ec281da2..9cef6eb2 100644 --- a/docs/source/02_hello_world_example/02_first_steps.md +++ b/docs/source/02_hello_world_example/02_first_steps.md @@ -121,4 +121,4 @@ Reopen the ui, select the last run and see that the file was uploaded: This works for any type of file (including images with ``MatplotlibWriter``) and the UI even offers a preview for ``png`` and ``csv``, which is really convenient to compare runs. -*Note: Mlflow offers specific logging for machine learning models that should be better suited for your use case, but is not supported yet in ``kedro-mlflow==0.2.0``* +*Note: Mlflow offers specific logging for machine learning models that may be better suited for your use case, but is not supported yet in ``kedro-mlflow==0.3.0``* diff --git a/docs/source/03_tutorial/04_version_parameters.md b/docs/source/03_tutorial/04_version_parameters.md index a307b566..8950caee 100644 --- a/docs/source/03_tutorial/04_version_parameters.md +++ b/docs/source/03_tutorial/04_version_parameters.md @@ -1,7 +1,7 @@ # Parameters versioning ## Automatic parameters versioning -Parameters versioning is automatic when the ``MlflowNodeHook`` is added to [the hook list of the ``ProjectContext``](./02_setup.md). In ``kedro-mlflow==0.2.0``, this hook has a parameter called ``flatten_dict_params`` which enables to [log as distinct parameters the (key, value) pairs of a ```Dict`` parameter](../05_python_objects/02_Hooks.md). +Parameters versioning is automatic when the ``MlflowNodeHook`` is added to [the hook list of the ``ProjectContext``](./02_setup.md). In ``kedro-mlflow==0.3.0``, the `mlflow.yml` configuration file has a parameter called ``flatten_dict_params`` which enables to [log as distinct parameters the (key, value) pairs of a ```Dict`` parameter](../05_python_objects/02_Hooks.md). You **do not need any additional configuration** to benefit from parameters versioning. diff --git a/docs/source/03_tutorial/05_version_datasets.md b/docs/source/03_tutorial/05_version_datasets.md index 958a131e..d0ed0e95 100644 --- a/docs/source/03_tutorial/05_version_datasets.md +++ b/docs/source/03_tutorial/05_version_datasets.md @@ -67,7 +67,7 @@ The location where artifact will be stored does not depends of the logging funct You can also refer to [this issue](https://github.com/Galileo-Galilei/kedro-mlflow/issues/15) for further details. -In ``kedro-mlflow==0.2.0`` you must configure these elements by yourself. Further releases will introduce helpers for configuration. +In ``kedro-mlflow==0.3.0`` you must configure these elements by yourself. Further releases will introduce helpers for configuration. ### Can I log an artifact in a specific run? The ``MlflowArtifactDataSet`` has an extra argument ``run_id`` which specifies the run in which the artifact will be logged. **Be cautious, because this argument will take precedence over the current run** when you call ``kedro run``, causing the artifact to be logged in another run that all the other data of the run.