Skip to content

Commit 065b349

Browse files
committed
Fix: New calculation for num_granule.
1 parent c78f2c5 commit 065b349

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

axlearn/common/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,9 +1830,9 @@ def create_device_mesh(
18301830
if not all(el.platform == device_platform for el in devices):
18311831
raise NotImplementedError(f"Not all devices had platform: {device_platform}.")
18321832
print("IS MULTI GRANULE by camilo: {is_multi_granule_env}")
1833-
print(f"Granule devices: {(getattr(el, device_attr) for el in devices.flatten())} + 1, by camilo")
1833+
print(f"Granule devices: {[getattr(el, device_attr) for el in devices.flatten()]} + 1, by camilo")
18341834
num_granules = (
1835-
max(getattr(el, device_attr) for el in devices.flatten()) + 1 if is_multi_granule_env else 1
1835+
len({getattr(el, device_attr) for el in devices.flatten()}) if is_multi_granule_env else 1
18361836
)
18371837
num_devices = len(devices)
18381838
assert (

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ gcp = [
109109
tpu = [
110110
"axlearn[gcp]",
111111
"jax[tpu]==0.10.0", # must be >=0.4.19 for compat with v5p.
112-
"pathwaysutils==0.1.2", # For JAX+Pathways single-controller accelerator coordinator.
112+
"pathwaysutils @ git+https://github.com/AI-Hypercomputer/pathways-utils.git",
113113
]
114114
# Vertex AI tensorboard. TODO(markblee): Merge with `gcp`.
115115
vertexai_tensorboard = [
@@ -174,6 +174,9 @@ build.targets.wheel.exclude = ["**/BUILD", "axlearn/experiments/testdata"]
174174
# This is where the code is for historical reasons.
175175
build.targets.wheel.packages = ["axlearn"]
176176

177+
[tool.hatch.metadata]
178+
allow-direct-references = true
179+
177180
[tool.pytype]
178181
inputs = ["axlearn"]
179182

0 commit comments

Comments
 (0)