mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
[Fix]: fix deep copy data list item (#471)
This commit is contained in:
parent
8770c6c7fc
commit
5d27504a06
@ -264,7 +264,7 @@ class BaseDataset(Dataset):
|
||||
self.data_bytes[start_addr:end_addr]) # type: ignore
|
||||
data_info = pickle.loads(bytes) # type: ignore
|
||||
else:
|
||||
data_info = self.data_list[idx]
|
||||
data_info = copy.deepcopy(self.data_list[idx])
|
||||
# Some codebase needs `sample_idx` of data information. Here we convert
|
||||
# the idx to a positive number and save it in data information.
|
||||
if idx >= 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user