Skip to content

Python Zip and Strict = True is 3.10 only...fails on 3.9 with TypeError: zip() takes no keyword arguments #62

Closed

Description

@lessw2020

In parallelism/init.py, build mesh uses zip with the kwarg strict=True.

for d, name in zip(
            [self.dp, self.sp, self.pp], ["dp", "sp", "pp"], strict=True
        ):

This is apparently 3.10+ keyword, and fails out in Python 3.9 with this error.

File "/opt/hpcaas/.mounts/fs-5c62ddab/home/less/tt2/./train.py", line 85, in main
    world_mesh = parallel_dims.build_mesh(device_type="cuda")
  File "/opt/hpcaas/.mounts/fs-5c62ddab/home/less/tt2/torchtrain/parallelisms/__init__.py", line 44, in build_mesh
    for d, name in zip(    
for d, name in zip(
TypeError: zip() takes no keyword arguments

We'll need to either require 3.10 in requirements.txt or else pass on using this keyword for now.

Activity

  1. added
    documentation
    on May 3, 2024
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

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions