Skip to content

[MLFLow] after enabling auth, service wont start due to missing packages #110

@dakotabenjamin

Description

@dakotabenjamin

from the logs:

[MLflow] Security middleware enabled with default settings (localhost-only). To allow connections from other hosts, use --host 0.0.0.0 and configure --allowed-hosts and --cors-allowed-origins.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mlflow/server/auth/__init__.py", line 206, in <module>
    from flask_wtf.csrf import CSRFProtect
ModuleNotFoundError: No module named 'flask_wtf'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/mlflow", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1485, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1406, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1873, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1269, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 824, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mlflow/cli/__init__.py", line 626, in server
    _run_server(
  File "/usr/local/lib/python3.10/site-packages/mlflow/server/__init__.py", line 387, in _run_server
    is_factory = _is_factory(app)
  File "/usr/local/lib/python3.10/site-packages/mlflow/server/__init__.py", line 226, in _is_factory
    mod = importlib.import_module(module)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/site-packages/mlflow/server/auth/__init__.py", line 208, in <module>
    raise ImportError(
ImportError: The MLflow basic auth app requires the Flask-WTF package to perform CSRF validation. Please run `pip install mlflow[auth]` to install it.

I cant find anything in the mlflow docs to indicate why this addon wouldn't be installed be default. What is the best way to add this to the container? do we need to roll our own? I fear we are adding a lot of dependencies to the whole fAIr setup.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions