hoops_ai.ml.EXPERIMENTAL.flow_trainer

Classes

FlowTrainer([flowmodel, datasetLoader, ...])

class hoops_ai.ml.EXPERIMENTAL.flow_trainer.FlowTrainer(flowmodel=None, datasetLoader=None, batch_size=64, num_workers=0, experiment_name='UNKNOWN_Experiment', accelerator='cpu', devices='auto', gradient_clip_val=1.0, max_epochs=100, learning_rate=0.002, result_dir=None, **trainer_kwargs)

Bases: object

Parameters:
metrics_storage()

Return the location of the metrics

Return type:

str

purify(num_processes=1, chunks_per_process=1)

Purify the datasets in parallel (if num_processes > 1) or in a single process. This method executes a forward/backward pass on a batch of size 1 to check for numerical errors (e.g., NaNs or crashes) and logs a JSON file for each processed chunk.

Parameters:
  • num_processes (int)

  • chunks_per_process (int)

test(trained_model_path)

Tests the model using the specified checkpoint.

Parameters:

trained_model_path (str)

train()

Trains the model and returns the path to the best checkpoint.

Return type:

str