TS1TestMixin#

class ts1.TS1TestMixin[source]#

Bases: object

Mixin enforcing the TS1 benchmark test contract.

Declares setup_test_loader and test as final so no subclass can alter what data is evaluated or how results are computed. Validation strategy is intentionally left to the concrete trainer.

Assumes the subclass also inherits from core.trainer.BaseTrainer (for self.device, self.logger, self.precision, self.push_logs, self.rank, etc.) and that the following attributes are initialized before calling test:

  • self.task

  • self.readout_spec

  • self.model

  • self.best_model

  • self.test_dataset

  • self.test_loader

  • self.best_metrics

  • self.return_value

  • self.cfg

and the following method is implemented:

  • self.predict(X, target_timestamps=None, target_mask=None)