I am trying to serve my model after model registry. The model is successfully being registered in mlflow but when I am going to serve it it is showing the following error.
Error: Got unexpected extra arguments (Class Classification New log)
Thu May 19 06:52:51 UTC 2022
Waiting for another process to start...
Usage: mlflow artifacts download [OPTIONS]
Try 'mlflow artifacts download --help' for help.
Related
I'm trying to follow the steps in this tutorial: https://learn.microsoft.com/en-us/azure/container-apps/deploy-visual-studio-code
I've got the plugins setup in VSCode and the sample code cloned to my machine. However, when I right-click on the Dockerfile and select "Build Image in Azure", I'm unable to get it to complete. There's no error, the deployment just seemingly hangs, this is the only output I get:
The Docker extension will try to connect to 'unix:///var/run/docker.sock', via context 'default'.
Setting up temp file with 'sourceArchive89321.tar.gz'
Sending source code to temp file
Getting build source upload URL
Creating block blob
Uploaded source code to /var/folders/bn/t9ncw2gx1fxc_2c8h2wb22940000gn/T/sourceArchive89321.tar.gz
Set up run request
Scheduled run ca9
2022/11/02 02:34:13 Downloading source code...
2022/11/02 02:34:14 Finished downloading source code
2022/11/02 02:34:13 Downloading source code...
2022/11/02 02:34:14 Finished downloading source code
2:34:15 Setting up Docker configuration...
2022/11/02 02:34:15 Successfully set up Docker configuration
2022/11/02 02:34:15 Logging in to registry: inhearten.azurecr.io
2022/11/02 02:34:16 Successfully logged into inhearten.azurecr.io
2022/11/02 02:34:16 Executing step ID: build. Timeout(sec): 28800, Working directory: '', Network: ''
2022/11/02 02:34:16 Scanning for dependencies...
2022/11/02 02:34:17 Successfully scanned dependencies
2022/11/02 02:34:17 Launching container with name: build
Sending build context to Docker daemon 173.6kB
Step 1/10 : FROM node:lts-alpine
lts-alpine: Pulling from library/node
213ec9aee27d: Already exists
9653b84b6e0f: Pulling fs layer
78c6f799e789: Pulling fs layer
d64061ca841e: Pulling fs layer
d64061ca841e: Verifying Checksum
d64061ca841e: Download complete
78c6f799e789: Verifying Checksum
78c6f799e789: Download complete
9653b84b6e0f: Verifying Checksum
9653b84b6e0f: Download complete
9653b84b6e0f: Pull complete
And it just stays at that final step infinitely, and the image never shows up in the Azure docker registry I specified.
What I tried:
Deploying the docker image to azure
What I expected:
It to successfully deploy
What happened:
It's stuck on Step 1/10 with no error message or obvious way to proceed
I tried to reproduce the same issue in my environment and got the below results
I have VS code setup in my local and installed the docker setup
Cloning the sample URL Using this document
git clone https://github.com/Azure-Samples/containerapps-albumapi-javascript.git
Signed into the azure and followed the same steps which mention in the document
In the explorer window, open the docker file which we have cloned and right click on the Dockerfile and click on Build image
While creating the build give the registry name which we have to mention and click on enter it will create the build as shown in below
The docker image got success fully deployed
Now we can see the newly created images by using the below command
docker images
NOTE:
1). We are getting these type of errors because of source code not cloned properly for that delete the entire source code and re-clone it again
2). please check the versions try to install the latest versions
All,
I started the mlflow server as below. I do see the backend store containing the expected metadata. However, the artifact folder is empty despite many runs.
> mlflow server --backend-store-uri mlflow_db --default-artifact-root
> ./mlflowruns --host 0.0.0.0 --port 5000
The mlflow ui has the below message for the artifacts section:
No Artifacts Recorded
Use the log artifact APIs to store file outputs from MLflow runs.
What am I doing wrong?
Thanks,
grajee
Turns out that
"--backend-store-uri mlflow_db" was pointing to D:\python\Pythonv395\Scripts\mlflow_db
and
"--default-artifact-root ./mlflowruns" was pointing to D:\DataEngineering\MlFlow\Wine Regression\mlflowruns which is the project folder.
I was able to point both the output to one folder with the following syntax
file:/D:/DataEngineering/MlFlow/Wine Regression
In case you want to log artifacts to your server with local file system as object storage, you should specify --serve-artifact --artifact-destination file:/path/to/your/desired/location instead of just a vanilla path.
I'm having an issue to serve a model with reference to model registry. According to help, the path should look like this:
models:/model_name/stage
When I type in terminal:
mlflow models serve -m models:/ml_test_model1/Staging --no-conda -h 0.0.0.0 -p 5003
I got the error:
mlflow.exceptions.MlflowException: Not a proper models:/ URI: models:/ml_test_model1/Staging/MLmodel. Models URIs must be of the form 'models:/<model_name>/<version or stage>'.
Model is registered and visible in db and server.
If I put absolute path, it works (experiment_id/run_id/artifacts/model_name).
mlflow version: 1.4
Python version: 3.7.3
Is it matter of some environmental settings or something different?
That style of referencing model artefacts is fixed from mlflow v1.5 (Bug Fix).
You'll need to run mlflow db upgrade <db uri> to refresh your schemas before restarting your mlflow server.
You may find listing registered models helpful:
<server>:<port>/api/2.0/preview/mlflow/registered-models/list
setting the env solved this for me:
export MLFLOW_TRACKING_URI=http://localhost:5000
mlflow models serve models:/my_clf_model/Staging -p 1234 -h 0.0.0.0 --no-conda
I run a mlflow server with the following command using mlflow, version 1.2.0
mlflow server --host myhost -p myport --backend-store-uri mysql://user#localhost/mlflow --default-artifact-root hdfs://myhost/user/myid/mlflow_test
I run the experiment from MLflow tutorial quickstart https://www.mlflow.org/docs/latest/quickstart.html
the command:
mlflow run sklearn_elasticnet_wine -P alpha=0.5 --no-conda
the code to log the model is
mlflow.sklearn.log_model(lr, "model")
in
https://github.com/mlflow/mlflow/blob/master/examples/sklearn_elasticnet_wine/train.py
I visit the server by webbrowser myhost: myport and check the run I ran.
I successfully get the ran info by myhost: myport/#/experiments/0/runs/run_id
in this page, i found that the first layer (model directory) path is correct. that is, run_id/artifacts/model
correct path
but once I click the MLmodel file under model folder, the path get wrong:
I expect to see run_id/artifacts/model/MLmodel
but actually it was run_id/artifacts/MLmodel
wrong path
Folks
I am trying to deploy a simple node.js app onto appengine. Every time I deploy the same using gcloud deploy, I get these warning and errors in the logs. I am using the config module in node.js also to load some general environment variables I need. Any pointers apprecaited if others have come across similar runtime issues? here is log when I execute the command:
gcloud app deploy app.yaml
No cached base image found for entry
us.gcr.io/.../app-engine-build-cache/node-cache:f0sdafsadasdfsadfasfasdfasdf
Step #1 - "builder": INFO Cache miss on local cache for us.gcr.io/.../app-engine-build-cache/node-cache:f0sdafsadasdfsadfasfasdfasdf
....
later....
...
Step #1 - "builder": ERROR Error during upload of: us.gcr.io/.../app-engine-build-cache/node-cache:f0sdafsadasdfsadfasfasdfasdf
Finally my deploy fails
File upload done.
Updating service [myservice name]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build <number> status: FAILURE. Check the build log for errors: https://console.cloud.google.com/gcr/builds/<my build number>
I am using
$gcloud version
Google Cloud SDK 214.0.0
bq 2.0.34
core 2018.08.24
gsutil 4.33
$ npm --version
6.3.0
thanks for any pointers where things might be going wrong.