Skip to content

Commit

Permalink
PARTIAL #6 - Fix documentation typo with wrong reference to version
Browse files Browse the repository at this point in the history
  • Loading branch information
Galileo-Galilei committed Oct 19, 2020
1 parent e8f9f09 commit 75bd45e
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 24 deletions.
6 changes: 6 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
13 changes: 5 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@

## [Unreleased]

### Added

-

### 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` have now 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).

## [0.3.0] - 2020-10-11

Expand Down
20 changes: 10 additions & 10 deletions docs/source/01_introduction/02_motivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?

Expand Down Expand Up @@ -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._
4 changes: 2 additions & 2 deletions docs/source/01_introduction/03_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down
2 changes: 1 addition & 1 deletion docs/source/02_hello_world_example/01_example_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.**
2 changes: 1 addition & 1 deletion docs/source/02_hello_world_example/02_first_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,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``*
2 changes: 1 addition & 1 deletion docs/source/03_tutorial/04_version_parameters.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/03_tutorial/05_version_datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 75bd45e

Please sign in to comment.