TS2TestMixin#
- class ts2.TS2TestMixin[source]#
Bases:
objectMixin enforcing the TS2 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.model
self.best_model
self.test_loader
self.best_metrics
self.return_value
self.cfg
and the following method is implemented:
self.predict(X, mask=None, mask_timestamps=None, mask_units=None)