Skip to content
Snippets Groups Projects
Commit 97028b02 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Throw error when folder already exists

parent 6747ed58
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ class ModelExporter: ...@@ -55,7 +55,7 @@ class ModelExporter:
self.dfg = DFG(onnx_model.graph) self.dfg = DFG(onnx_model.graph)
output_dir = Path(output_dir).absolute() output_dir = Path(output_dir).absolute()
os.makedirs(output_dir, exist_ok=True) os.makedirs(output_dir, exist_ok=False) # Will throw if already existss
self.weight_dir = output_dir / self.weight_dir_name self.weight_dir = output_dir / self.weight_dir_name
self.weight_dir.mkdir(exist_ok=True) self.weight_dir.mkdir(exist_ok=True)
self.codefile = output_dir / self.source_file_name self.codefile = output_dir / self.source_file_name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment