Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding another way of calculating gradients in downsamplers #540

Merged
merged 18 commits into from
Jun 25, 2024
Merged
Prev Previous commit
Next Next commit
Merge branch 'main' into XianzheMa/bug/fix-505
  • Loading branch information
XianzheMa authored Jun 24, 2024
commit 8f587b8fc2b309eccbb461c0d2f1dcd476686de4
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def get_sampler_config(modyn_config, balance=False):
"selection_batch": 64,
"greedy": "NaiveGreedy",
"full_grad_approximation": "LastLayerWithEmbedding",
XianzheMa marked this conversation as resolved.
Show resolved Hide resolved
"ratio_max": 100,
}
return 0, 0, 0, params_from_selector, modyn_config.model_dump(by_alias=True), per_sample_loss_fct, "cpu"

Expand Down Expand Up @@ -354,6 +355,7 @@ def test_matching_results_with_deepcore(dummy_system_config: ModynConfig):
"selection_batch": 64,
"greedy": "NaiveGreedy",
"full_grad_approximation": "LastLayerWithEmbedding",
"ratio_max": 100,
},
dummy_system_config.model_dump(by_alias=True),
BCEWithLogitsLoss(reduction="none"),
Expand Down Expand Up @@ -415,6 +417,7 @@ def test_matching_results_with_deepcore_permutation(dummy_system_config: ModynCo
"selection_batch": 64,
"greedy": "NaiveGreedy",
"full_grad_approximation": "LastLayerWithEmbedding",
"ratio_max": 100,
},
dummy_system_config.model_dump(by_alias=True),
BCEWithLogitsLoss(reduction="none"),
Expand Down Expand Up @@ -480,6 +483,7 @@ def test_matching_results_with_deepcore_permutation_fancy_ids(dummy_system_confi
"selection_batch": 64,
"greedy": "NaiveGreedy",
"full_grad_approximation": "LastLayerWithEmbedding",
"ratio_max": 100,
},
dummy_system_config.model_dump(by_alias=True),
BCEWithLogitsLoss(reduction="none"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def get_sampler_config(modyn_config: ModynConfig, balance=False):
"args": {},
"balance": balance,
"full_grad_approximation": "LastLayerWithEmbedding",
"ratio_max": 100,
}
return 0, 0, 0, params_from_selector, modyn_config.model_dump(by_alias=True), per_sample_loss_fct, "cpu"

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.