Beispiel #1
0
    def __getstate__(self):
        if IterDataPipe.getstate_hook is not None:
            return IterDataPipe.getstate_hook(self)

        state = (
            self.datapipes,
            self.length,
        )
        return state
Beispiel #2
0
    def __getstate__(self):
        if IterDataPipe.getstate_hook is not None:
            return IterDataPipe.getstate_hook(self)

        state = (
            self.main_datapipe,
            self.num_instances,
            self.buffer_size,
        )
        return state
Beispiel #3
0
    def __getstate__(self):
        if IterDataPipe.getstate_hook is not None:
            return IterDataPipe.getstate_hook(self)

        state = (
            self.datapipes,
            self.length,
            self._valid_iterator_id,
            self._number_of_samples_yielded,
        )
        return state
Beispiel #4
0
 def __getstate__(self):
     if IterDataPipe.getstate_hook is not None:
         return IterDataPipe.getstate_hook(self)
     state = (
         self.datapipe,
         self.buffer_size,
         self._enabled,
         self._seed,
         self._rng.getstate(),
     )
     return state
Beispiel #5
0
    def __getstate__(self):
        if IterDataPipe.getstate_hook is not None:
            return IterDataPipe.getstate_hook(self)

        state = (
            self.main_datapipe,
            self.num_instances,
            self.buffer_size,
            self._valid_iterator_id,
            self._number_of_samples_yielded,
        )
        return state
Beispiel #6
0
 def __getstate__(self):
     if IterDataPipe.getstate_hook is not None:
         return IterDataPipe.getstate_hook(self)
     state = (
         self.datapipe,
         self.group_key_fn,
         self.max_buffer_size,
         self.group_size,
         self.guaranteed_group_size,
         self.drop_remaining,
         self.wrapper_class,
     )
     return state
Beispiel #7
0
    def __getstate__(self):
        if IterDataPipe.getstate_hook is not None:
            return IterDataPipe.getstate_hook(self)

        serialized_fn_with_method = serialize_fn(self.classifier_fn)
        state = (
            self.main_datapipe,
            self.num_instances,
            self.buffer_size,
            serialized_fn_with_method,
            self.drop_none,
        )
        return state
Beispiel #8
0
 def __getstate__(self):
     if IterDataPipe.getstate_hook is not None:
         return IterDataPipe.getstate_hook(self)
     state = (
         self.datapipe,
         self.buffer_size,
         self._enabled,
         self._seed,
         self._valid_iterator_id,
         self._number_of_samples_yielded,
         self._rng.getstate(),
     )
     return state
Beispiel #9
0
    def __getstate__(self):
        if IterDataPipe.getstate_hook is not None:
            return IterDataPipe.getstate_hook(self)

        state = (
            self.main_datapipe,
            self.num_instances,
            self.buffer_size,
            serialize_fn(self.classifier_fn)
            if DILL_AVAILABLE else self.classifier_fn,
            self.drop_none,
        )
        return state
Beispiel #10
0
 def __getstate__(self):
     if IterDataPipe.getstate_hook is not None:
         return IterDataPipe.getstate_hook(self)
     state = (
         self.datapipe,
         self.group_key_fn,
         self.max_buffer_size,
         self.group_size,
         self.guaranteed_group_size,
         self.drop_remaining,
         self.wrapper_class,
         self._valid_iterator_id,
         self._number_of_samples_yielded,
     )
     return state