Skip to content

Commit

Permalink
tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
beckynevin committed Jul 16, 2024
1 parent 763182a commit 1db37aa
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/scripts/Aleatoric.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ def parse_args():
"-dp",
default=DefaultsAnalysis["model"]["data_prescription"],
)
parser.add_argument(
"--data_dimension",
"-dd",
default=DefaultsAnalysis["model"]["data_dimension"],
)
parser.add_argument(
"--n_models",
type=int,
Expand Down Expand Up @@ -179,6 +184,8 @@ def beta_type(value):
"model", "data_prescription", "Analysis")
inject_type_list = config.get_item(
"analysis", "inject_type_list", "Analysis")
dim = config.get_item(
"model", "data_dimension", "Analysis")
sigma_list = []
for noise in noise_list:
sigma_list.append(DataPreparation.get_sigma(noise))
Expand Down Expand Up @@ -220,6 +227,7 @@ def beta_type(value):
model,
prescription,
typei,
dim,
noise,
epoch,
DEVICE,
Expand All @@ -245,6 +253,7 @@ def beta_type(value):
model,
prescription,
typei,
dim,
noise,
epoch,
DEVICE,
Expand Down
3 changes: 2 additions & 1 deletion src/utils/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"model_engine": "DE",
"model_type": "DE",
"data_prescription": "linear_homoskedastic",
"data_dimension": "0D",
"n_models": 100,
"n_epochs": 100,
"BETA": 0.5,
Expand All @@ -113,7 +114,7 @@
},
"analysis": {
"noise_level_list": ["low"],
"model_names_list": ["DER"],
"model_names_list": ["DE"],
"inject_type_list": ["feature"],
# ["DER_wst", "DE_desiderata_2"],
# for architecture: ["DER"], #, "DE_desiderata_2"],
Expand Down
7 changes: 7 additions & 0 deletions test/test_Aleatoric.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def create_test_config_aleatoric(
"n_models": n_models,
"n_epochs": n_epochs,
"data_prescription": "linear_homoskedastic",
"data_dimension": "0D",
"BETA": 0.5,
"COEFF": 0.01,
"loss_type": "DER",
Expand Down Expand Up @@ -121,11 +122,16 @@ def create_test_config_DE(
"overwrite_final_checkpoint": True,
"plot": False,
"savefig": False,
"save_chk_random_seed_init": False,
"rs_list": [41, 42],
"save_n_hidden": False,
"n_hidden": 64,
"verbose": False,
},
"data": {
"data_path": temp_data,
"data_engine": "DataLoader",
"data_dimension": "0D",
"data_prescription": "linear_homoskedastic",
"data_injection": "predictive",
"size_df": size_df,
Expand Down Expand Up @@ -166,6 +172,7 @@ def create_test_config_DER(
"data": {
"data_path": temp_data,
"data_engine": "DataLoader",
"data_dimension": "0D",
"data_prescription": "linear_homoskedastic",
"data_injection": "predictive",
"size_df": size_df,
Expand Down
5 changes: 5 additions & 0 deletions test/test_DeepEnsemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,16 @@ def create_test_config(
"overwrite_final_checkpoint": True,
"plot": False,
"savefig": True,
"save_chk_random_seed_init": False,
"rs_list": [41, 42],
"save_n_hidden": False,
"n_hidden": 64,
"verbose": False,
},
"data": {
"data_path": temp_data,
"data_engine": "DataLoader",
"data_dimension": "0D",
"data_prescription": "linear_homoskedastic",
"data_injection": "predictive",
"size_df": size_df,
Expand Down
1 change: 1 addition & 0 deletions test/test_DeepEvidentialRegression.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def create_test_config(
"data": {
"data_path": temp_data,
"data_engine": "DataLoader",
"data_dimension": "0D",
"data_prescription": "linear_homoskedastic",
"data_injection": "predictive",
"size_df": size_df,
Expand Down

0 comments on commit 1db37aa

Please sign in to comment.