deephyper.predictor.torch.TorchPredictorFileLoader#

class deephyper.predictor.torch.TorchPredictorFileLoader(path_predictor_file: str)[source]#

Bases: PredictorFileLoader

Loads a predictor from a file for the TensorFlow Keras 2 backend.

Parameters:

path_predictor_file (str) – the path to the predictor file.

Methods

find_predictor_files

Finds the predictor files in a directory given a specific extension.

load

Loads a predictor.

static find_predictor_files(path_directory: str, file_extension: str = 'pt') List[str][source]#

Finds the predictor files in a directory given a specific extension.

Parameters:
  • path_directory (str) – the directory path.

  • file_extension (str, optional) – the file extension. Defaults to "pt".

Returns:

the list of predictor files found in the directory.

Return type:

List[str]

load() TorchPredictor[source]#

Loads a predictor.

Returns:

the loaded predictor.

Return type:

Predictor