Skip to content

array_typing._check_dataclass_annotations breaks inside REPLs #596

Description

@johnnewsom

if frame.frame.f_globals doesn't have __name__ (e.g. in a REPL), then openpi.shared.array_typing._check_dataclass_annotations raises an error. You can fix this by replacing the raw index (frame.frame.f_globals["__name__"]) with frame.frame.f_globals.get("__name__").

Reproducible by calling Observation.from_dict inside the interpreter

frame.frame.f_globals["__name__"] in {"jax._src.tree_util", "flax.nnx.transforms.compilation"}

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