tirank.TrainPre.tune_hyperparameters

tirank.TrainPre.tune_hyperparameters(savePath, device='cpu', n_trials=50)[source]

Runs the Optuna hyperparameter tuning study.

This function loads all necessary data and model parameters, then initializes and runs an Optuna study to find the best hyperparameters by minimizing the validation loss.

Parameters:
  • savePath (str) – The main project directory path.

  • device (str, optional) – The compute device. Defaults to “cpu”.

  • n_trials (int, optional) – The number of Optuna trials to run. Defaults to 50.

Returns:

None