-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem following basic usage of jupyter mlflow and prefect tutorial #67
Comments
Thanks for pointing this out: We have recently upgraded our Ory Kratos module version, which has the info we need there under a different key. We will need to update the tutorial notebook code to reflect that. |
Good afternoon @bernardolk, I'm also following this tutorial and applying the change you mentioned leads me to another error I can't figure out how to solve. I've tried multiple things like passing flow as param, creating cookies, forcing refresh, passing a value that forcing refresh returns, .. with no sucess. I'm appending the request result after just getting the correct {
"id":"0fcc6629-2668-4af2-8824-c30396d7b173",
"type":"api",
"expires_at":"2021-08-23T16:00:06.279179Z",
"issued_at":"2021-08-23T15:50:06.279179Z",
"request_url":"http://mlops.mydomain.com/self-service/login/api",
"ui":{
"action":"https://mlops.mydomain.com/.ory/kratos/public/self-service/login?flow=0fcc6629-2668-4af2-8824-c30396d7b173",
"method":"POST",
"nodes":[
{
"type":"input",
"group":"default",
"attributes":{
"name":"csrf_token",
"type":"hidden",
"value":"",
"required":true,
"disabled":false
},
"messages":"None",
"meta":{
}
},
{
"type":"input",
"group":"password",
"attributes":{
"name":"password_identifier",
"type":"text",
"value":"",
"required":true,
"disabled":false
},
"messages":"None",
"meta":{
"label":{
"id":1070004,
"text":"ID",
"type":"info"
}
}
},
{
"type":"input",
"group":"password",
"attributes":{
"name":"password",
"type":"password",
"required":true,
"disabled":false
},
"messages":"None",
"meta":{
"label":{
"id":1070001,
"text":"Password",
"type":"info"
}
}
},
{
"type":"input",
"group":"password",
"attributes":{
"name":"method",
"type":"submit",
"value":"password",
"disabled":false
},
"messages":"None",
"meta":{
"label":{
"id":1010001,
"text":"Sign in",
"type":"info",
"context":{
}
}
}
}
],
"messages":[
{
"id":4010002,
"text":"Could not find a strategy to log you in with. Did you fill out the form correctly?",
"type":"error"
}
]
},
"created_at":"2021-08-23T15:50:06.281029Z",
"updated_at":"2021-08-23T15:50:06.281029Z",
"forced":false
}```
|
I am sorry to hear you wasted so much time @jonpoveda! I know what your issue is. Ory also changed the way you need to send the credentials in their flow. |
do you know if there is also any modification in the prefect api to create the project apparently it is waiting for a tenant id
we have solved this by updating the prefect version my current version is : '0.14.12' after updating '0.15.4' which accepts tenant id this allows me to move forward but then we get error again with the versions :
|
The second error I have not seen before. I would recommend that you stick with the previous version since in Open MLOps module definitions we are using an image with Prefect in that version. So if you wish to upgrade the version in the notebook you would also need to upgrade the image so the pods in your cluster run a matching version. Then, you will need to fix the first error: Bug: prefect-server-agent pod is in a “CrashLoopBackOff” with an error of Your Prefect Server instance has no tenants. Create a tenant with
Solution: This means that the apollo pod didn’t create a tenant. To do this you need to:
|
I think that if a tenant exists, when querying in graphql I can see its name slug and id
output
However, I followed your instructions:
output
this is where I get stuck, maybe due to lack of knowledge. where should I execute the command
I tried in the same terminal, but of course I can't because it's busy with the port-forward. I also tried:
|
@Pfriasf you should open a new terminal tab after port-forwarding, but make sure you have prefect installed locally. What is happening is that you are forwarding the port from the cluster to your local machine, then having prefect installed (via pip install) in your local machine, you can access the prefect server in your cluster from it. |
after run
im using ubuntu |
There seems to be a problem with your pip installation. Do you have python installed? |
Hi,
I followed the fix and it seems to work. the prefect-server-agent pod is running. When I check prefect dashboard, I can see there is 1 agent running. But when I run notebook, I still get the same error. How do I debug this? Thanks |
@NhatAnh Can you share the request you made? Please make sure that python and prefect version running in your notebook instance is the same that is running in your prefect agent. |
@pedrocwb I'm just doing the tutorial https://github.com/datarevenue-berlin/OpenMLOps/blob/master/tutorials/basic-usage-of-jupyter-mlflow-and-prefect.md I use OpenMLOps-AWS terraform scripts to set it up, so I think the versions should match. How do I check if if a tenant has been created or not? |
I tried to create prefect project in prefect dashboard. And in Jupyter notebook, only register the already existing project, but now I get error:
|
How do I change python version of the jupyter notebook? It seems prefect does not work well with python 3.9 |
You would need to change the notebook image, which is specified in the singleuser option of the jupyterhub module. If you want to test with a different python version, though, you can try creating a virtual env in your machine, locally, with a different python version and install prefect client there. Should be faster. But I am not sure that's the issue, do you have any references to where they say Prefect doesn't play nice with Python 3.9? |
It seems the tenant is created. But Apollo can't connect to Graphql server: As you can see when installing helm chart of prefect there is a job ran to create a tenant id. kubectl logs -n prefect prefect-server-create-tenant-job-xxxx (change pod name)
Tenant created with ID: 496e7a7e-7fad-44ca-9cb1xxxxxxxxxx Also it seems the default url for /graphql/ is internet facing URL so it is uses ory kratos but since it is not authenticated it gets 401 error (auth failed). So we logon to prefect.domain/graphql/ using kratos but UI itself is not authenticated.... |
@bernardolk can you shed some light on this issue ? |
Also one thing i found out that you always download latest version: Though it is not for prefect/server docker image i have seen that image had an issue and i switched it to 0.15.4 version manually for tenant creation images (that is prefectVersionTag) as defined here: https://github.com/PrefectHQ/server/blob/master/helm/prefect-server/values.yaml#L13-L17 Also Server Tags are different https://github.com/PrefectHQ/server/tags and is used with helm chart version. https://github.com/PrefectHQ/server/blob/master/helm/prefect-server/values.yaml#L3-L11 I Also updated jupyterhub with a new docker image to install 0.15.4 of prefect python packages by updating https://github.com/datarevenue-berlin/OpenMLOps/blob/master/docker/openmlops-notebook/Dockerfile#L4 but still getting same error. Any update greatly appreciated! |
Alright, so @vkocaman you are getting 401 status code when prefect tries to access the @omerfsen-gsnd I will make sure to fix the Prefect version, thanks. |
Good afternoon,
In the prefect configuration step, I get the following error:
in the response you don't get the key "methods".
Response example
The text was updated successfully, but these errors were encountered: