[error] error submitting build task: 400 Client Error: Bad Request for url: http://localhost:8080/api/v1/build/function: details: {'reason': "Runtime error: 'K8sHelper' object has no attribute 'v1api'"}, caused by: 400 Client Error: Bad Request for url: http://localhost:8080/api/v1/build/function #5579
ujjwal-here-h
started this conversation in
General
Replies: 1 comment
-
Problem OverviewYou're encountering an error with serving_fn.set_tracking() in MLRun, which is related to model monitoring. The error happens because MLRun expects a Kubernetes environment, but you're using Docker. Solution Steps1. Use the local runtimeTell MLRun to deploy locally instead of trying to use Kubernetes: 2. Skip
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am attempting to execute the tutorial notebook found at: MLRun Model Monitoring and Drift Detection.
However, while running this line -
project.deploy_function(serving_fn)I encounter the following error:[error] error submitting build task: 400 Client Error: Bad Request for url: http://localhost:8080/api/v1/build/function: details: {'reason': "Runtime error: 'K8sHelper' object has no attribute 'v1api'"}, caused by: 400 Client Error: Bad Request for url: http://localhost:8080/api/v1/build/functionI did some testing and figured out that this issue specifically arises when I use the following line of code:
serving_fn.set_tracking()#for enabling model monitoringIf I comment out this line, the deployment proceeds without issues using
project.deploy_function(serving_fn)However, if I execute serving_fn.set_tracking(), I receive the previously mentioned error. The error message suggests that the deployment is looking for a Kubernetes cluster, but I have not configured one and am using Docker instead.
Could there be a parameter that can be set to direct the deployment to a local (Docker) environment? I tried setting local = True here:
serving_fn.add_model( "cancer-classifier", model_path=trainer_run.outputs["model"], class_name="mlrun.frameworks.sklearn.SklearnModelServer", local =True)but it didn't solve the issue.
MLRun is installed on Docker. I can access the following components:
MLRun UI (in http://localhost:8060/)
Nuclio Dashboard/controller (in http://localhost:8070/)
MLRun API (in http://localhost:8080/) --> returns {"detail":"Not Found"}
I run the tutorial code in my IDE and I can see the project in the MLRun UI. Everything seems to work fine but when it comes to serving a function using the deploy_function it fails with the above error. It would be very nice if someone could tell me what's wrong with the configuration or what is supposed to be the API call that would work.
Beta Was this translation helpful? Give feedback.
All reactions