Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions torchft/diloco_regression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def train_loop(self) -> Dict[str, Any]:
manager_steps.add(manager_curr_step)

# For each parameter, set a deterministic gradient
for _, layer in enumerate(self.model.layers):
for layer in self.model.layers:
if isinstance(layer, MockLinear):
# Set fixed gradients
layer.weight.grad = (
Expand Down Expand Up @@ -356,7 +356,7 @@ def test_diloco_mocked_updates(
)
futures.append(executor.submit(runner.run_replica))

for fut in as_completed(futures):
for _fut in as_completed(futures):
continue

results = []
Expand Down Expand Up @@ -440,7 +440,7 @@ def test_diloco_mocked_failure_recovery(
futures.append(executor.submit(runner.run_replica))

# Wait for all futures to complete
for fut in as_completed(futures):
for _fut in as_completed(futures):
continue

results = []
Expand Down Expand Up @@ -503,9 +503,7 @@ def _check_against_fixture(
return False

# Compare fixture data with current results
for replica_idx, (fixture_history, current_history) in enumerate(
zip(fixture_data, results)
):
for fixture_history, current_history in zip(fixture_data, results):
fixture_history = fixture_history[0]["history"]
current_history = current_history[0]["history"]
for step, fixture_params in fixture_history.items():
Expand Down
Loading