Skip to content

Commit

Permalink
Add remaining stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
pomonam committed Jun 22, 2024
1 parent 523e7d8 commit cce322b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions tests/modules/test_per_sample_gradients.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def test_for_loop_per_sample_gradient_equivalence(
"test_name",
[
"mlp",
"repeated_mlp",
"conv",
"conv_bn",
"bert",
Expand Down Expand Up @@ -242,6 +241,7 @@ def test_mean_gradient_equivalence(
module_gradients[module.name] = module.get_factor(factor_name=PRECONDITIONED_GRADIENT_NAME)

per_sample_gradients.append(module_gradients)
set_mode(model, ModuleMode.PRECONDITION_GRADIENT, keep_factors=False)

summed_gradients = []
for i in range(num_batches):
Expand Down Expand Up @@ -291,7 +291,6 @@ def test_mean_gradient_equivalence(
"test_name",
[
"mlp",
"repeated_mlp",
"conv",
"gpt",
],
Expand Down
1 change: 1 addition & 0 deletions tests/test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def test_default_score_arguments() -> None:
assert score_args.cached_activation_cpu_offload is False
assert score_args.distributed_sync_steps == 1000
assert score_args.amp_dtype is None
assert score_args.shared_parameters_exist is False

assert score_args.data_partition_size == 1
assert score_args.module_partition_size == 1
Expand Down

0 comments on commit cce322b

Please sign in to comment.