mlflow.sagemaker
-
mlflow.sagemaker.
build_image
(name='mlflow_sage', mlflow_home=None) This function builds an MLflow Docker image. The image is built locally and it requires Docker to run.
Parameters: name – image name
-
mlflow.sagemaker.
deploy
(app_name, model_path, execution_role_arn, bucket, run_id=None, image='mlflow_sage', region_name='us-west-2') Deploy model on Sagemaker. Current active AWS account needs to have correct permissions setup.
Parameters: - app_name – Name of the deployed app.
- path – Path to the model. Either local if no run_id or MLflow-relative if run_id is specified)
- execution_role_arn – Amazon execution role with sagemaker rights
- bucket – S3 bucket where model artifacts are gonna be stored
- run_id – MLflow run id.
- image – name of the Docker image to be used.
- region_name – Name of the AWS region to deploy to.
-
mlflow.sagemaker.
push_image_to_ecr
(image='mlflow_sage') Push local Docker image to ECR.
The image is pushed under current active aws account and to current active AWS region.
Parameters: image – image name
-
mlflow.sagemaker.
run_local
(model_path, run_id=None, port=5000, image='mlflow_sage') Serve model locally in a SageMaker compatible Docker container. :param model_path: Path to the model. Either local if no run_id or MLflow-relative if run_id is specified) :param run_id: MLflow RUN-ID. :param port: local port :param image: name of the Docker image to be used.