Skip to content

Commit af4d97c

Browse files
committed
Refactor pnn.py: remove unused aleatoric uncertainty estimation code
1 parent 7d21feb commit af4d97c

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

uqdd/models/pnn.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,6 @@ def run_pnn(config: Optional[dict] = None) -> nn.Module: # uq: bool = False
259259
config : Optional[dict], optional
260260
Configuration dictionary for model training, by default None.
261261
262-
uq : bool
263-
Whether to use aleatoric uncertainty estimation, by default
264-
265262
Returns
266263
-------
267264
nn.Module
@@ -274,33 +271,6 @@ def run_pnn(config: Optional[dict] = None) -> nn.Module: # uq: bool = False
274271
logger=LOGGER,
275272
)
276273

277-
# if uq:
278-
# dataloaders = get_dataloader(config, device=DEVICE, logger=LOGGER)
279-
# preds, labels, alea_vars = predict(
280-
# best_model, dataloaders["test"], device=DEVICE
281-
# )
282-
# # Then comes the predict metrics part
283-
# metrics, plots, uct_logger = evaluate_predictions(
284-
# config, preds, labels, alea_vars, "pnn", LOGGER
285-
# )
286-
# # RECALIBRATION # Get Calibration / Validation Set
287-
# preds_val, labels_val, alea_vars_val = predict(
288-
# best_model, dataloaders["val"], device=DEVICE
289-
# )
290-
# iso_recal_model = recalibrate_model(
291-
# preds_val,
292-
# labels_val,
293-
# alea_vars_val,
294-
# preds,
295-
# labels,
296-
# alea_vars,
297-
# config=config,
298-
# uct_logger=uct_logger,
299-
# )
300-
# uct_logger.wandb_log()
301-
# wandb.finish()
302-
# return best_model, iso_recal_model, metrics, plots
303-
304274
return best_model
305275

306276

0 commit comments

Comments
 (0)