Skip to content

Commit

Permalink
updating documentation to address issue 4202 Signed-off-by: westford1… (
Browse files Browse the repository at this point in the history
#4991)

* updating documentation to address issue 4202 Signed-off-by: westford14 <westford14@gmail.com>

Signed-off-by: westford14 <westford14@gmail.com>

* fixing the linting errors from the testing

Signed-off-by: westford14 <westford14@gmail.com>
  • Loading branch information
westford14 committed Nov 4, 2021
1 parent de9ffa1 commit b6eaafd
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 12 deletions.
16 changes: 13 additions & 3 deletions mlflow/tracking/_tracking_service/client.py
Expand Up @@ -214,10 +214,15 @@ def log_metric(self, run_id, key, value, timestamp=None, step=None):
Log a metric against the run ID.
:param run_id: The run id to which the metric should be logged.
:param key: Metric name.
:param key: Metric name (string). This string may only contain alphanumerics,
underscores (_), dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Metric value (float). Note that some special values such
as +/- Infinity may be replaced by other values depending on the store. For
example, the SQLAlchemy store replaces +/- Inf with max / min float values.
All backend stores will support values up to length 5000, but some
may support larger values.
:param timestamp: Time when this metric was calculated. Defaults to the current system time.
:param step: Training step (iteration) at which was the metric calculated. Defaults to 0.
"""
Expand Down Expand Up @@ -259,8 +264,13 @@ def set_tag(self, run_id, key, value):
Set a tag on the run with the specified ID. Value is converted to a string.
:param run_id: String ID of the run.
:param key: Name of the tag.
:param value: Tag value (converted to a string)
:param key: Tag name (string). This string may only contain alphanumerics, underscores
(_), dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Tag value (string, but will be string-ified if not).
All backend stores will support values up to length 5000, but some
may support larger values.
"""
_validate_tag_name(key)
tag = RunTag(key, str(value))
Expand Down
24 changes: 20 additions & 4 deletions mlflow/tracking/client.py
Expand Up @@ -636,10 +636,15 @@ def log_metric(
Log a metric against the run ID.
:param run_id: The run id to which the metric should be logged.
:param key: Metric name.
:param key: Metric name (string). This string may only contain alphanumerics, underscores
(_), dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Metric value (float). Note that some special values such
as +/- Infinity may be replaced by other values depending on the store. For
example, the SQLAlchemy store replaces +/- Inf with max / min float values.
All backend stores will support values up to length 5000, but some
may support larger values.
:param timestamp: Time when this metric was calculated. Defaults to the current system time.
:param step: Integer training step (iteration) at which was the metric calculated.
Defaults to 0.
Expand Down Expand Up @@ -689,7 +694,13 @@ def log_param(self, run_id: str, key: str, value: Any) -> None:
Log a parameter against the run ID.
:param run_id: The run id to which the param should be logged.
:param value: Value is converted to a string.
:param key: Parameter name (string). This string may only contain alphanumerics, underscores
(_), dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Parameter value (string, but will be string-ified if not).
All backend stores will support values up to length 5000, but some
may support larger values.
.. code-block:: python
:caption: Example
Expand Down Expand Up @@ -767,8 +778,13 @@ def set_tag(self, run_id: str, key: str, value: Any) -> None:
Set a tag on the run with the specified ID. Value is converted to a string.
:param run_id: String ID of the run.
:param key: Name of the tag.
:param value: Tag value (converted to a string)
:param key: Tag name (string). This string may only contain alphanumerics,
underscores (_), dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Tag value (string, but will be string-ified if not).
All backend stores will support values up to length 5000, but some
may support larger values.
.. code-block:: python
:caption: Example
Expand Down
25 changes: 20 additions & 5 deletions mlflow/tracking/fluent.py
Expand Up @@ -358,8 +358,13 @@ def log_param(key: str, value: Any) -> None:
Log a parameter under the current run. If no run is active, this method will create
a new active run.
:param key: Parameter name (string)
:param value: Parameter value (string, but will be string-ified if not)
:param key: Parameter name (string). This string may only contain alphanumerics,
underscores (_), dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Parameter value (string, but will be string-ified if not).
All backend stores will support values up to length 5000, but some
may support larger values.
.. code-block:: python
:caption: Example
Expand All @@ -378,8 +383,13 @@ def set_tag(key: str, value: Any) -> None:
Set a tag under the current run. If no run is active, this method will create a
new active run.
:param key: Tag name (string)
:param value: Tag value (string, but will be string-ified if not)
:param key: Tag name (string). This string may only contain alphanumerics, underscores
(_), dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Tag value (string, but will be string-ified if not).
All backend stores will support values up to length 5000, but some
may support larger values.
.. code-block:: python
:caption: Example
Expand Down Expand Up @@ -423,10 +433,15 @@ def log_metric(key: str, value: float, step: Optional[int] = None) -> None:
Log a metric under the current run. If no run is active, this method will create
a new active run.
:param key: Metric name (string).
:param key: Metric name (string). This string may only contain alphanumerics, underscores (_),
dashes (-), periods (.), spaces ( ), and slashes (/).
All backend stores will support keys up to length 250, but some may
support larger keys.
:param value: Metric value (float). Note that some special values such as +/- Infinity may be
replaced by other values depending on the store. For example, the
SQLAlchemy store replaces +/- Infinity with max / min float values.
All backend stores will support values up to length 5000, but some
may support larger values.
:param step: Metric step (int). Defaults to zero if unspecified.
.. code-block:: python
Expand Down

0 comments on commit b6eaafd

Please sign in to comment.