Datasets:

ArXiv:
Elron commited on
Commit
b45781e
1 Parent(s): 6926de6

Upload operator.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. operator.py +4 -3
operator.py CHANGED
@@ -133,13 +133,14 @@ class MultiStreamOperator(StreamingOperator):
133
 
134
  def __call__(self, multi_stream: Optional[MultiStream] = None) -> MultiStream:
135
  with nested_seed():
136
- return self._process_multi_stream(multi_stream)
 
 
 
137
 
138
  def _process_multi_stream(self, multi_stream: Optional[MultiStream] = None) -> MultiStream:
139
  result = self.process(multi_stream)
140
  assert isinstance(result, MultiStream), "MultiStreamOperator must return a MultiStream"
141
- if self.caching is not None:
142
- result.set_caching(self.caching)
143
  return result
144
 
145
  @abstractmethod
 
133
 
134
  def __call__(self, multi_stream: Optional[MultiStream] = None) -> MultiStream:
135
  with nested_seed():
136
+ result = self._process_multi_stream(multi_stream)
137
+ if self.caching is not None:
138
+ result.set_caching(self.caching)
139
+ return result
140
 
141
  def _process_multi_stream(self, multi_stream: Optional[MultiStream] = None) -> MultiStream:
142
  result = self.process(multi_stream)
143
  assert isinstance(result, MultiStream), "MultiStreamOperator must return a MultiStream"
 
 
144
  return result
145
 
146
  @abstractmethod