Skip to content

Commit 75e1621

Browse files
committed
Add warning comment
1 parent e668667 commit 75e1621

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ def get_model_by_name(system_config, run_config) -> torch.nn.Module:
182182
return ANN()
183183
else:
184184
try:
185+
# Downstream code leads to an error when executed in parallel
186+
# for the first time, due to possible race conditions...
187+
# File "torch/hub.py", in _get_cache_or_reload:
188+
# hub_dir = get_dir()
189+
# if not os.path.exists(hub_dir):
190+
# os.makedirs(hub_dir)
185191
return torch.hub.load(
186192
repo, model, pretrained=False, trust_repo=True, num_classes=num_classes
187193
)

0 commit comments

Comments
 (0)