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

pyglove/backend.py: remove invalid characters after function decorator #1030

Closed

Conversation

ConnorBaker
Copy link

Removes (what I think is) a bad edit introduced in 5aad0c0#diff-f913e6960ace197c5499de1d7a0da89de6a4e5e567b18e11b963e3b38c094c2aR381:

  @functools.lru_cache(maxsize=None)d_property
  def _tuner_id(self) -> str:
    """Returns the tuner id of current ."""
    return self._tuner.get_tuner_id(self._algorithm)

d_property isn't defined anywhere and causes the interpreter to throw a SyntaxError

Traceback (most recent call last):
  File "/Users/connorbaker/Packages/ghc_hyperopt/./ghc_hyperopt/__main__.py", line 6, in <module>
    from vizier import pyglove as pg_vizier
  File "/Users/connorbaker/micromamba/envs/ghc_hyperopt/lib/python3.11/site-packages/vizier/pyglove/__init__.py", line 20, in <module>
    from vizier._src.pyglove.oss_vizier import init
  File "/Users/connorbaker/micromamba/envs/ghc_hyperopt/lib/python3.11/site-packages/vizier/_src/pyglove/oss_vizier.py", line 32, in <module>
    from vizier._src.pyglove import backend
  File "/Users/connorbaker/micromamba/envs/ghc_hyperopt/lib/python3.11/site-packages/vizier/_src/pyglove/backend.py", line 422
    @functools.lru_cache(maxsize=None)d_property
                                      ^^^^^^^^^^
SyntaxError: invalid syntax

CC @daiyip -- am I missing something?

@sagipe
Copy link
Member

sagipe commented Jan 9, 2024

Thank you Connor!

This was a bug in our release to github process, bundled with the fact that our Github tests for Pyglove were disabled and we didn't notice that.

This also caused #1031

Working on a PR to fix both issues properly, please stay tuned.
Thank you for reporting!

Best,
Sagi

copybara-service bot pushed a commit that referenced this pull request Jan 9, 2024
Also fix the issue encountered in #1030

PiperOrigin-RevId: 596786128
copybara-service bot pushed a commit that referenced this pull request Jan 9, 2024
Also fix the issue encountered in #1030

PiperOrigin-RevId: 596786128
copybara-service bot pushed a commit that referenced this pull request Jan 9, 2024
Also fix the issue encountered in #1030

PiperOrigin-RevId: 596975797
@ConnorBaker
Copy link
Author

Superseded by dd72c5f

@ConnorBaker ConnorBaker closed this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants