Skip to content

Commit b101248

Browse files
prdaifacebook-github-bot
authored andcommitted
Fix for FileNotFoundError 'output/metrics.json'
Summary: FileNotFoundError: [Errno 2] No such file or directory: 'output/metrics.json' Thanks for your contribution! #3587 With best regards, Ranuga Pull Request resolved: #3588 Differential Revision: D31789957 Pulled By: ppwwyyxx fbshipit-source-id: d5c81a81425cbefef7154aaa52d6e38cfa796385
1 parent ea3a8f8 commit b101248

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

detectron2/engine/defaults.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ def default_writers(output_dir: str, max_iter: Optional[int] = None):
240240
Returns:
241241
list[EventWriter]: a list of :class:`EventWriter` objects.
242242
"""
243+
PathManager.mkdirs(output_dir)
243244
return [
244245
# It may not always print what you want to see, since it prints "common" metrics only.
245246
CommonMetricPrinter(max_iter),

0 commit comments

Comments
 (0)