We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3ba459 commit bd1fa26Copy full SHA for bd1fa26
nanodet/trainer/task.py
@@ -217,7 +217,11 @@ def test_epoch_end(self, test_step_outputs):
217
results = {}
218
for res in test_step_outputs:
219
results.update(res)
220
- all_results = gather_results(results) if self.trainer.use_ddp else results
+ all_results = (
221
+ gather_results(results)
222
+ if dist.is_available() and dist.is_initialized()
223
+ else results
224
+ )
225
if all_results:
226
res_json = self.evaluator.results2json(all_results)
227
json_path = os.path.join(self.cfg.save_dir, "results.json")
0 commit comments