MCPcopy Create free account
hub / github.com/apple/ml-pointersect / epoch_setup

Method epoch_setup

cdslib/core/script/base_train.py:1079–1087  ·  view source on GitHub ↗

Set up at the beginning of an epoch, before dataloder iterator is constructed. It can be used to setup the batch sampler, etc.

(
            self,
            epoch: int,
            dataloader: T.Sequence[T.Any],
            val_dataloader: T.Sequence[T.Any],
            test_dataloader: T.Sequence[T.Any],
    )

Source from the content-addressed store, hash-verified

1077
1078 @customer
1079 def epoch_setup(
1080 self,
1081 epoch: int,
1082 dataloader: T.Sequence[T.Any],
1083 val_dataloader: T.Sequence[T.Any],
1084 test_dataloader: T.Sequence[T.Any],
1085 ):
1086 """Set up at the beginning of an epoch, before dataloder iterator
1087 is constructed. It can be used to setup the batch sampler, etc."""
1088
1089 @customer
1090 def train_setup(self, epoch: int):

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected