MCPcopy Create free account
hub / github.com/pytorch/pytorch / _is_stream_handle

Method _is_stream_handle

torch/utils/data/datapipes/utils/decoder.py:291–293  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

289
290 @staticmethod
291 def _is_stream_handle(data):
292 obj_to_check = data.file_obj if isinstance(data, StreamWrapper) else data
293 return isinstance(obj_to_check, (io.BufferedIOBase, io.RawIOBase))
294
295 def decode1(self, key, data):
296 if not data:

Callers 1

decode1Method · 0.80

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected