-
Notifications
You must be signed in to change notification settings - Fork 71
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
PyGlove interface errors with google-vizier 0.1.13 #1044
Comments
Apologies, it should work fine at HEAD. |
Thanks for your quick response. For the record, I pulled your latest commit, and am now having an issue importing vizier_server from vizier.service. Trying to run this down now. Trying to follow the example in the docs for using Vizier as a backend for PyGlove, for the record. A more complete example would be helpful, for what its worth. E.g., its not clear from that section how pg_vizier.init("my_study") creates an object that can be used to query for the optimal trials, as per the examples in other sections. |
Our unit tests and Colab notebooks run fine with version 0.1.14. If you're having an issue importing RE the pyglove question, see an example of querying the result in
We can add an example to the docs as well. Best, |
(FYI) The tutorial for running PyGlove with OSS Vizier is here: https://oss-vizier.readthedocs.io/en/latest/advanced_topics/pyglove/vizier_as_backend.html Is there something missing / not working about it? |
I will provide more detail as I attempt to run through the example on my machine. With respect to the PyGlove example specifically, it was not clear to me at all what the line
is doing. It seems to be using a different interface than the Vizier basics examples, which had you initialize a server and a client separately, and then use the client to query the database for the results. A slightly separate issue, but still relevant, is that there does not appear to be a reference anywhere in the examples of how the datastore is initialized, and/or how we might configure to interface with a pre-existing database. I'm planning on running my tuning experiments when the machines on my network are otherwise latent, and would need/want the database to persist. Probably the answer will be obvious once I find the relevant code in the repo, but doubts/issues such as this are slowing me down. |
Related to the database concern, I thought I had it running on my machine as I had a run without error, but tried another run, and am getting the error "Failed to find study name: my_study.basic_run" Presumably that should have been created somewhere behind the scenes, but not clear where. edit:
I get two failures consistently, both of which seem to be pointing to a study not being found. The failed tests are I am also intermittently getting an error "Cannot start already-started server!" which appears to be attempting to initialize a new Pythia process. I'm not getting these errors when running the Vizier Basics example. Edit: On my machine, practically all of the threads hit the database up for the study to have been created before it was by some other process, causing an error. By the time this error is handled, it appears as if the RPC's are killed either by a timeout or the simple fact that an error had occurred. I get the error:
This reads to me as though the RPC terminates when that exception is first encountered, but sometimes my process crashses with:
This leads me to believe that sometimes the service is able to generate/start the study and actually gets to attempting to run trials before crashing, which points more to something like a socket timeout. Not sure. |
With regards to to importing vizier_server, it works if I change the input to vizier._src.service, but still does not work if I try to import from vizier.service Error: I did pull the recent changes and re-install before trying this, fwiw. Edit: |
There's a few facts that might help this thread overall:
|
Did as you suggested, still have the same errors. Btw, I had run the script to compile the protos after I had pulled from the repo and re-installed the local copy, so I think that part should have been fine. |
@gelatinouscube42 can you send a code snippet to reproduce this issue? |
Sure, see below. It is more or less verbatim taken from the example in the docs...
|
PiperOrigin-RevId: 602940226
PiperOrigin-RevId: 602940226
PiperOrigin-RevId: 602940226
PiperOrigin-RevId: 602940226
There was an error in backend.py causing the library imports to fail, some extra text that needed to be deleted.
Then in core.py, there is an attempted import from vizier.google of "metadata_to_user" which breaks the import of that file.
Looking at this repo, it seems these were already addressed at some point, but perhaps not pushed to the pip repository.
The text was updated successfully, but these errors were encountered: