mlflow: [BUG] OSError: [Errno 30] Read-only file system: '/app'
Thank you for submitting an issue. Please refer to our issue policy for additional information about bug reports. For help with debugging your code, please refer to Stack Overflow.
Please fill in this bug report template to ensure a timely and thorough response.
Willingness to contribute
The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the MLflow code base?
- Yes. I can contribute a fix for this bug independently.
- Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
- No. I cannot contribute a bug fix at this time.
System information
- Have I written custom code (as opposed to using a stock example script provided in MLflow): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS 12.3.1
- MLflow installed from (source or binary): binary
- MLflow version (run
mlflow --version): 1.12.1 - Python version: 3.8
- npm version, if running the dev UI:
- Exact command to reproduce:
Describe the problem
When trying to log the mlflow pyfunc model to mlflow tracking server, it is giving an error as mentioned in title. Expected behaviour is that no error should come.
Code to reproduce issue
import mlflow
import os
#removed below params due to confidentiality
os.environ['MLFLOW_S3_ENDPOINT_URL'] = ""
os.environ['AWS_ACCESS_KEY_ID'] = ""
os.environ['AWS_SECRET_ACCESS_KEY'] = ""
mlflow.set_tracking_uri("")
mlflow.set_registry_uri("")
class AwesomeModel(mlflow.pyfunc.PythonModel):
def load_context(self, context):
pass
def predict(self,context,inp_df):
return 5
with mlflow.start_run() as run:
mlflow.pyfunc.log_model(
python_model=AwesomeModel(),
artifact_path="ml-storage",
artifacts=None,
registered_model_name="ml_serving_demo_model")
Other info / logs
Traceback (most recent call last):
File "prob.py", line 19, in <module>
mlflow.pyfunc.log_model(
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/pyfunc/__init__.py", line 993, in log_model
return Model.log(
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/models/model.py", line 173, in log
mlflow.tracking.fluent.log_artifacts(local_path, artifact_path)
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/tracking/fluent.py", line 557, in log_artifacts
MlflowClient().log_artifacts(run_id, local_dir, artifact_path)
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/tracking/client.py", line 911, in log_artifacts
self._tracking_client.log_artifacts(run_id, local_dir, artifact_path)
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/tracking/_tracking_service/client.py", line 287, in log_artifacts
self._get_artifact_repo(run_id).log_artifacts(local_dir, artifact_path)
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/store/artifact/local_artifact_repo.py", line 57, in log_artifacts
mkdir(artifact_dir)
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/utils/file_utils.py", line 112, in mkdir
raise e
File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/utils/file_utils.py", line 109, in mkdir
os.makedirs(target)
File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
[Previous line repeated 1 more time]
File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 221, in makedirs
mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/app'
What component(s), interfaces, languages, and integrations does this bug affect?
Components
-
area/artifacts: Artifact stores and artifact logging -
area/build: Build and test infrastructure for MLflow -
area/docs: MLflow documentation pages -
area/examples: Example code -
area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry -
area/models: MLmodel format, model serialization/deserialization, flavors -
area/projects: MLproject format, project running backends -
area/scoring: MLflow Model server, model deployment tools, Spark UDFs -
area/server-infra: MLflow Tracking server backend -
area/tracking: Tracking Service, tracking client APIs, autologging
Interface
-
area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server -
area/docker: Docker use across MLflow’s components, such as MLflow Projects and MLflow Models -
area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry -
area/windows: Windows support
Language
-
language/r: R APIs and clients -
language/java: Java APIs and clients -
language/new: Proposals for new client languages
Integrations
-
integrations/azure: Azure and Azure ML integrations -
integrations/sagemaker: SageMaker integrations -
integrations/databricks: Databricks integrations
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (11 by maintainers)
Got it. I think this is not a bug in mlflow then. I am closing this issue. Thank you for your help @harupy . Much appreciated.
Tried it, and now it is working fine
But I dont understand why do we require to set experiment? The same thing was working before also, why not now.