Skip to content

Commit

Permalink
Deprecate --file-store CLI argument to mlflow server and mlflow ui (
Browse files Browse the repository at this point in the history
mlflow#1196)

Removes the --file-store option from the mlflow server and mlflow ui CLI commands. Users should update their CLI commands to use the --backend-store-uri option instead. For example,
mlflow server --file-store /my/local/path becomes mlflow server --backend-store-uri file:///my/local/path
  • Loading branch information
smurching committed May 4, 2019
1 parent 7d79511 commit 4edf15a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Start it with::
mlflow ui

**Note:** Running ``mlflow ui`` from within a clone of MLflow is not recommended - doing so will
run the dev UI from source. We recommend running the UI from a different working directory, using the
``--file-store`` option to specify which log directory to run against. Alternatively, see instructions
for running the dev UI in the `contributor guide <CONTRIBUTING.rst>`_.
run the dev UI from source. We recommend running the UI from a different working directory,
specifying a backend store via the ``--backend-store-uri`` option. Alternatively, see
instructions for running the dev UI in the `contributor guide <CONTRIBUTING.rst>`_.


Running a Project from a URI
Expand Down
2 changes: 0 additions & 2 deletions docs/source/tracking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ By default ``--backend-store-uri`` is set to the local ``./mlruns`` directory (t
running ``mlflow run`` locally), but when running a server, make sure that this points to a
persistent (that is, non-ephemeral) file system location.

.. note::
For backwards compatibility, ``--file-store`` is an alias for this option.

The artifact store is a location suitable for large data (such as an S3 bucket or shared NFS
file system) and is where clients log their artifact output (for example, models).
Expand Down
2 changes: 1 addition & 1 deletion mlflow/R/mlflow/R/tracking-server.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mlflow_server <- function(file_store = "mlruns", default_artifact_root = NULL,
file_store <- fs::path_abs(file_store)

args <- mlflow_cli_param(list(), "--port", port) %>%
mlflow_cli_param("--file-store", file_store) %>%
mlflow_cli_param("--backend-store-uri", file_store) %>%
mlflow_cli_param("--default-artifact-root", default_artifact_root) %>%
mlflow_cli_param("--host", host) %>%
mlflow_cli_param("--port", port) %>%
Expand Down
24 changes: 12 additions & 12 deletions mlflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,13 @@ def run(uri, entry_point, version, param_list, experiment_name, experiment_id, m


@cli.command()
@click.option("--backend-store-uri", "--file-store", metavar="PATH",
@click.option("--backend-store-uri", metavar="PATH",
default=DEFAULT_LOCAL_FILE_AND_ARTIFACT_PATH,
help="URI or path for backend store implementation. Acceptable backend store "
"are SQLAlchemy compatible implementation or local storage. "
"Example 'sqlite:///path/to/file.db'. "
"By default file backed store will be used. (default: ./mlruns).")
help="URI to which to persist experiment and run data. Acceptable URIs are "
"SQLAlchemy-compatible database connection strings "
"(e.g. 'sqlite:///path/to/file.db') or local filesystem URIs "
"(e.g. 'file:///absolute/path/to/directory'). By default, data will be logged "
"to the ./mlruns directory.")
@click.option("--default-artifact-root", metavar="URI", default=None,
help="Path to local directory to store artifacts, for new experiments. "
"Note that this flag does not impact already-created experiments. "
Expand Down Expand Up @@ -201,14 +202,13 @@ def _validate_static_prefix(ctx, param, value): # pylint: disable=unused-argume


@cli.command()
@click.option("--backend-store-uri", "--file-store", metavar="PATH",
@click.option("--backend-store-uri", metavar="PATH",
default=DEFAULT_LOCAL_FILE_AND_ARTIFACT_PATH,
help="URI or path for backend store implementation. Acceptable backend store "
"are SQLAlchemy compatible implementation or local storage. Supports "
"various SQLAlchemy compatible database like SQLite, MySQL, PostgreSQL. As an "
"example MySQL backed store can be configured using connection string. "
"'mysql://<user_name>:<password>@<host>:<port>/<database_name>' "
"By default file based backed store will be used. (default: ./mlruns).")
help="URI to which to persist experiment and run data. Acceptable URIs are "
"SQLAlchemy-compatible database connection strings "
"(e.g. 'sqlite:///path/to/file.db') or local filesystem URIs "
"(e.g. 'file:///absolute/path/to/directory'). By default, data will be logged "
"to the ./mlruns directory.")
@click.option("--default-artifact-root", metavar="URI", default=None,
help="Local or S3 URI to store artifacts, for new experiments. "
"Note that this flag does not impact already-created experiments. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private MlflowClient startServerProcess() throws IOException {
int freePort = getFreePort();
String bindAddress = "127.0.0.1";
pb.command("mlflow", "server", "--host", bindAddress, "--port", "" + freePort,
"--file-store", tempDir.resolve("mlruns").toString(), "--workers", "1");
"--backend-store-uri", tempDir.resolve("mlruns").toString(), "--workers", "1");
serverProcess = pb.start();

// NB: We cannot use pb.inheritIO() because that interacts poorly with the Maven
Expand Down

0 comments on commit 4edf15a

Please sign in to comment.