Skip to content

Fixes needed to run with current (2026) package versions #9

Description

@AndreasPlt

Thanks for publishing this codebase, it has been a useful reference for my own work!

Running the training scripts with current package versions required a few changes. Documenting them here in case it helps others who fork this repo (not expecting any merges into the main branch):

1. Hardcoded user paths in PathUtils.scratch_dir (utils.py:38-42)

scratch_dir is hardcoded to /Users/Matteo/scratch/ (macOS) and /local/scratch/mb2389/ (Linux). Replacing this with an environment variable + fallback default works:

scratch_dir = Path(os.environ.get("HETGPPO_SCRATCH_DIR", Path.home() / ".hetgppo" / "scratch"))

Additionally, the _temp_dir passed to ray.init() should be removed, as on macOS, long scratch paths exceed the 103-byte AF_UNIX socket limit. Ray's default (/tmp/ray) works fine.

2. Pydantic v1/v2 incompatibility

Ray 2.1.0 uses pydantic.fields.ModelField, which was removed in pydantic v2. Pinning pydantic<2 resolves this.

3. RelVel transform (models/gppo.py:100)

torch_geometric.transforms.BaseTransform now requires a forward method instead of __call__. Renaming __call__ to forward fixes:

TypeError: Can't instantiate abstract class RelVel with abstract method forward

Tested with: Python 3.10, Ray 2.1.0, pydantic 1.10.26, torch-geometric 2.7+, wandb 0.25.1.

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