diff --git a/src/neptune_mlflow_exporter/__init__.py b/src/neptune_mlflow_exporter/__init__.py index 94eb5da..35fc27f 100644 --- a/src/neptune_mlflow_exporter/__init__.py +++ b/src/neptune_mlflow_exporter/__init__.py @@ -25,7 +25,7 @@ @click.option( "--exclude-artifacts", "-e", - help="Specifies whether to also include artifacts in the upload", + help="Specifies whether to exclude artifacts from the upload", required=False, default=False, type=bool, diff --git a/src/neptune_mlflow_plugin/impl/__init__.py b/src/neptune_mlflow_plugin/impl/__init__.py index b5d134d..46c6f9f 100644 --- a/src/neptune_mlflow_plugin/impl/__init__.py +++ b/src/neptune_mlflow_plugin/impl/__init__.py @@ -25,6 +25,34 @@ @functools.wraps(neptune.init_run) def create_neptune_tracking_uri(**kwargs) -> str: + """Sets up a Neptune tracking URI for logging MLflow experiment metadata. + + This lets you direct your metadata to Neptune instead of MLflow, without needing to change your MLflow logging code. + + The function wraps neptune.init_run(), so you have the same parameters available for customizing your run or + limiting what is logged. The exceptions are with_id and custom_run_id, which will be ignored if provided (as calling + this function always creates a new Neptune run). + For the full list, see the Neptune documentation: https://docs.neptune.ai/api/neptune/#init_run + + Examples: + Create default Neptune tracking URI: + >>> from neptune_mlflow_plugin import create_neptune_tracking_uri + >>> uri = create_neptune_tracking_uri() + >>> mlflow.set_tracking_uri(uri) + >>> with mlflow.start_run() as mlflow_run: + ... ... + + Create Neptune run with more customized options: + >>> uri = create_neptune_tracking_uri( + ... name="my-custom-run-name", + ... description="Description of the run", + ... tags=["test", "mlflow"], + ... source_files="**/.py", + ... dependencies="infer", + ... ) + + For detailed instructions, see the Neptune-MLflow integration guide: https://docs.neptune.ai/integrations/mlflow/ + """ kwargs["tags"] = ( list(kwargs["tags"]) if ("tags" in kwargs and isinstance(kwargs["tags"], set)) else kwargs.get("tags") )