tejal567
tejal567

Reputation: 129

OSError: [Errno 30] Read-only file system: '/app' when executing mlflow.pyfunc.log_model

I am getting below error when tried to execute this code:

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")

ERROR: OSError: [Errno 30] Read-only file system: '/app'

Python version: 3.8 Mlflow version: 1.12.1

Upvotes: 3

Views: 1171

Answers (1)

Ilya Frolov
Ilya Frolov

Reputation: 11

I have the same error, when I start mlflow server with absolute paths

mlflow server --backend-store-uri sqlite:////Users/app/mlflowdir/mlflow.db \
--default-artifact-root file:////Users/app/mlflowdir/artifacts \
--port 22222 --host localhost

Try to remove mlflow.db file, artifacts directory and restart mlflow server with relative paths

mlflow server --backend-store-uri sqlite:///mlflow.db \
--default-artifact-root artifacts \ 
--port 22222 --host localhost

Upvotes: 1

Related Questions