in oss-torch-connector/osstorchconnector/oss_map_dataset.py [0:0]
def _get_client(self):
if self._client is None:
self._client = OssClient(self._endpoint, self._cred_path, self._config_path, self._uuid)
log.info("OssMapDataset new client")
if self._client_pid != os.getpid():
worker_info = torch.utils.data.get_worker_info()
if worker_info is not None:
# reset client id
self._client._id = worker_info.id
self._client._total = worker_info.num_workers
self._client_pid = os.getpid()
return self._client