Skip to content

Trace doesn't work with python 3.13 #43

Description

Trace seems to have some error with the bundle decorator when running on python 3.13. Downgrading to 3.12 does not have this error.

Traceback (most recent call last):
File "/Users/ryanrong/Documents/GitHub/cs224n_llm_agent/pong_LLM_agent.py", line 269, in
rewards = optimize_policy(
env_name="ALE/Pong-v5",
...<4 lines>...
model="gpt-4o-mini"
)
File "/Users/ryanrong/Documents/GitHub/cs224n_llm_agent/pong_LLM_agent.py", line 169, in optimize_policy
@trace.bundle(trainable=True)
~~~~^^^^^^^^^^^^^^^^
File "/Users/ryanrong/.pyenv/versions/3.13.1/lib/python3.13/site-packages/opto/trace/bundle.py", line 57, in decorator
fun_module = FunModule(
fun=fun,
...<7 lines>...
_ldict=prev_f_locals, # Get the locals of the calling function
)
File "/Users/ryanrong/.pyenv/versions/3.13.1/lib/python3.13/site-packages/opto/trace/bundle.py", line 114, in init
assert _ldict is None or isinstance(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ldict, dict
^^^^^^^^^^^^
), "_ldict must be a dictionary. or None"
^
AssertionError: _ldict must be a dictionary. or None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions