Skip to content
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

[code_search] Script to load model metrics into Katib/ModelDB #134

Closed
jlewi opened this issue Jun 10, 2018 · 23 comments
Closed

[code_search] Script to load model metrics into Katib/ModelDB #134

jlewi opened this issue Jun 10, 2018 · 23 comments

Comments

@jlewi
Copy link
Contributor

jlewi commented Jun 10, 2018

We'd like to take advantage of Katib's integration with model db. To track the performance of models.
More detail can be found in the doc.

The first step is probably a simple script that can load relevant data about a model into Katib. The data we probably want is

  • GCS location of the model
  • Evaluation metrics for the model
@jlewi jlewi added the area/example/code_search The code search example label Jun 10, 2018
@jlewi
Copy link
Contributor Author

jlewi commented Jun 30, 2018

Here are some instructions on how to use ModelDB for this.
https://github.com/mitdbg/modeldb/blob/master/client/python/light_api.md

I looked at the Katib CLI but I'm not sure the Katib CLI is that useful in this case.

@jlewi
Copy link
Contributor Author

jlewi commented Jun 30, 2018

I used the ModelDB sample code to create a model and store data in ModelDB
https://github.com/jlewi/kubeflow-dev/tree/master/modeldb

This appears to have worked

  • In the projects UI tab I can see the newly created project and it lists two models
  • It also shows some statistics that lead me to believe the data was actually loaded

projects

But when I click on the projects tab I just get a screen that says loading models

loading_models

@mpvartak Any thoughts?

I'd like to be able to use ModelDB to store metadata about a model e.g.

  • Location of a model
  • Data used to train
  • Various metrics and parameters

And then be able to use ModelDB's UI to browse the models.

@jlewi jlewi changed the title [code_search] Script to load model metrics into Katib [code_search] Script to load model metrics into Katib/ModelDB Jul 2, 2018
@mpvartak
Copy link

mpvartak commented Jul 3, 2018

@jlewi this is the same workflow that's being used in Katib afaik. So that should work the same. I will try to repro the bug and ping back here.

@jlewi
Copy link
Contributor Author

jlewi commented Jul 3, 2018

Thanks.

@mpvartak
Copy link

mpvartak commented Jul 3, 2018

See the BasicWorkflow.ipynb example in http://modeldb.csail.mit.edu:8000
This is the same workflow you are using afaik.
I am not seeing the error in the frontend UI: http://modeldb.csail.mit.edu:3000

Do you have a different setup?

@jlewi
Copy link
Contributor Author

jlewi commented Jul 5, 2018

@mpvartak What do you mean by setup? I'm running on GKE using Katib so I assume the setup is different (possibly different versions of modeldb from what is running in your setup).

I copied the code from https://github.com/mitdbg/modeldb/blob/master/client/python/light_api.md so I expect its the same.

Can you provide suggestions on how to debug this?

Is there a way to query the database directly e.g. through an API or a CLI so I can see whether the data is there and whether its just a UI issue?

@mpvartak
Copy link

mpvartak commented Jul 7, 2018

Here's my setup: pip install modeldb + the docker versions of the frontend and backend. I'm on Python2.7. I use the same code as the on the webpage (Method 2 specifically) and am able to log models/visualize correctly. So I can confirm that works. I haven't tried on GKE, so can't comment on what might be going on there.

For debugging, the sqlite file lives in server/codegen/sqlite and can be read directly using sqlite3; you can query the mongo data via mongod. I'd recommend making sure that the sqlite DB shows the models in FitEvent table + ExperimentRun tables. If that looks good, then next step is to check on the key-value data stored in mongodb.

I can try to dig further if you can provide more info.

@bhack
Copy link

bhack commented Jul 7, 2018

When we talk about GCS, i.e. for the location of the model, can we use a more generic approach like GoogleContainerTools/kaniko#121 (comment)?

@jlewi
Copy link
Contributor Author

jlewi commented Jul 7, 2018

@mpvartak Can you provide your syncer config and a link to your python code?

@jlewi
Copy link
Contributor Author

jlewi commented Jul 7, 2018

@mpvartak I can see data in the sqllite DB but I'm not sure what I'm looking for. Would you be willing to try it out on our dev cluster (dev.kubeflow.org)? I'd be happy to give you access; I just need a Google account for you.

@jlewi
Copy link
Contributor Author

jlewi commented Jul 19, 2018

It looks like Katib added an API to upload model data; see
kubeflow/katib#43

I don't think there's a CLI yet; but we might have more luck with Katib.

@lluunn
Copy link
Contributor

lluunn commented Jul 31, 2018

cc @lluunn

@jlewi
Copy link
Contributor Author

jlewi commented Oct 14, 2018

@garganubhav is looking into this.

@garganubhav I think it would be fantastic if we can get ModelDB working so that we can load data in via API and use the API to browse and explore models.

@mpvartak
Copy link

Hey @jlewi @garganubhav my team is rewriting the guts of modeldb to make it more robust, add features, and make easy to deploy on kubernetes. let me share the roadmap and get the kubeflow team's feedback too. on slack, is katib the best channel to have this discussion?

i'm happy to help @garganubhav on this issue, let's figure out if it makes sense to integrate into current modeldb or can wait for next version.

@garganubhav
Copy link

@jlewi yes, would update very soon. @mpvartak thank you, the channel on slack is model-management

@chrisheecho
Copy link

Hi @garganubhav do you have any update on this one? we are trying to cut down issues on 0.4 and would love to get your take

@mpvartak
Copy link

mpvartak commented Oct 29, 2018 via email

@garganubhav
Copy link

@chrisheecho this is tested. Modeldb is working with Katib.

@jlewi
Copy link
Contributor Author

jlewi commented Dec 3, 2018

@garganubhav So do we have a script and docs somewhere that we can point customers to? What is the remaining work to close this out?

@garganubhav
Copy link

As I know, ModelDb is currently deleted from Katib.

@jlewi
Copy link
Contributor Author

jlewi commented Dec 17, 2018

@garganubhav @mpvartak has a PR open to add modeldb as a separate package. So it would still be good to have examples and instructions for how people can take advantage of modeldb to track their models.

@jlewi jlewi removed the area/0.4.0 label Dec 17, 2018
@garganubhav
Copy link

Yes, I was checking it before and was getting some error. Will try today again.

@stale
Copy link

stale bot commented Jun 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants