Skip to content

Commit

Permalink
1. Fix SQL datastore's commit logic
Browse files Browse the repository at this point in the history
2. Small changes to performance_test.py (NSGA2 gives too many trials)
3. Allow Python 3.12
4. Move to 0.1.24 Vizier version

PiperOrigin-RevId: 722128437
  • Loading branch information
xingyousong authored and copybara-github committed Feb 1, 2025
1 parent 615bb2a commit 7ce0ae8
Show file tree
Hide file tree
Showing 8 changed files with 229 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"] # 3.x disabled b/c of 3.12 test failures w/ GRPC.
python-version: ["3.12"] # 3.x disabled b/c of 3.13 test failures w/ JAX.
suffix: ["core", "benchmarks", "algorithms", "clients", "pyglove", "raytune"]
include:
- suffix: "clients"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
# NOTE: grpcio-tools needs to be periodically updated to support later Python versions.
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
# NOTE: grpcio-tools needs to be periodically updated to support later Python versions.
run: |
Expand Down
2 changes: 1 addition & 1 deletion vizier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

sys.path.append(PROTO_ROOT)

__version__ = "0.1.23"
__version__ = "0.1.24"
18 changes: 5 additions & 13 deletions vizier/_src/service/performance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import multiprocessing.pool
import time
from absl import logging

from absl import logging
from vizier._src.service import constants
from vizier._src.service import vizier_client
from vizier._src.service import vizier_server
Expand All @@ -41,23 +41,15 @@ def setUpClass(cls):
)
vizier_client.environment_variables.server_endpoint = cls.server.endpoint

@parameterized.parameters(
(1, 10, 2),
(2, 10, 2),
(10, 10, 2),
(50, 5, 2),
(100, 5, 2),
)
@parameterized.parameters((1, 10), (2, 10), (10, 10), (50, 5), (100, 5))
def test_multiple_clients_basic(
self, num_simultaneous_clients, num_trials_per_client, dimension
self, num_simultaneous_clients, num_trials_per_client
):
def fn(client_id: int):
experimenter = experimenters.BBOBExperimenterFactory(
'Sphere', dimension
)()
experimenter = experimenters.BBOBExperimenterFactory('Sphere', 2)()
problem_statement = experimenter.problem_statement()
study_config = pyvizier.StudyConfig.from_problem(problem_statement)
study_config.algorithm = pyvizier.Algorithm.NSGA2
study_config.algorithm = pyvizier.Algorithm.RANDOM_SEARCH

client = vizier_client.create_or_load_study(
owner_id='my_username',
Expand Down
Loading

0 comments on commit 7ce0ae8

Please sign in to comment.