Git Product home page Git Product logo

Comments (5)

xingyousong avatar xingyousong commented on May 5, 2024

Hi, can you give us a minimal example to reproduce this error? I'm wondering if your application is too concurrent-intensive: https://stackoverflow.com/questions/3172929/operationalerror-database-is-locked

So far, all of our unit tests pass, so we haven't encountered this error before.

from vizier.

bhawandeepsingh avatar bhawandeepsingh commented on May 5, 2024

Thanks @xingyousong
I am using the simple cookie example from vizier demo (code below).

from vizier import service
from vizier.service import clients
from vizier.service import pyvizier as vz

problem = vz.ProblemStatement()
problem.search_space.root.add_float_param('chocolate', 0.0, 1.0)
problem.metric_information.append(vz.MetricInformation(name='taste', goal=vz.ObjectiveMetricGoal.MAXIMIZE))

def evaluate(chocolate: float) -> float:
	return 1-2*(chocolate -.3)**2
	
study_config = vz.StudyConfig.from_problem(problem)
study_config.algorithm = 'GAUSSIAN_PROCESS_BANDIT'  

study_client = clients.Study.from_study_config(study_config, owner='bhawandeepsingh', study_id='cookie_study_0')
print('****************Local SQL database file located at: ', service.VIZIER_DB_PATH)

for _ in range(1) :
	suggestions = study_client.suggest(count=1)
	for suggestion in suggestions :
		chocolate = suggestion.parameters['chocolate']
		objective = evaluate(chocolate)
		print (chocolate, objective)
		final_measurement = vz.Measurement({'taste': objective})
		suggestion.complete(final_measurement)

I am using Ubuntu 22.04 and Python 3.10.12
Please let me know if any additional information can help you to find the root cause and I will provide it. Thanks

from vizier.

xingyousong avatar xingyousong commented on May 5, 2024

I just tried your code in colab (after installing with !pip install google-vizier[jax]) and everything worked fine. Can you make sure you have a fresh install (and even fresh colab kernel) when you execute that code snippet?

from vizier.

sagipe avatar sagipe commented on May 5, 2024

The Vizier server is using an in memory SQLITE database, so restarting the Colab runtime should solve this issue, or a fresh Colab runtime as Richard suggested above.
Best,
Sagi

from vizier.

bhawandeepsingh avatar bhawandeepsingh commented on May 5, 2024

Works in collab as specified.

from vizier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.