Skip to content

Commit

Permalink
postprocess fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed May 24, 2024
1 parent e7f1be1 commit 69c974b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mlonmcu/session/postprocess/postprocesses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1671,8 +1671,8 @@ def post_run(self, report, artifacts):
dest_ = Path(temp_dir.name)
else:
temp_dir = None
assert dest.is_dir(), f"Not a directory: {dest}"
dest_ = dest
assert self.dest.is_dir(), f"Not a directory: {self.dest}"
dest_ = self.dest
assert self.fmt in ["bin", "npy"], f"Invalid format: {self.fmt}"
filenames = []
for i, output in enumerate(outputs):
Expand Down Expand Up @@ -1722,7 +1722,7 @@ def dequant_helper(quant, data):
import tarfile
with tarfile.open(archive_path, "w:gz") as tar:
for filename in filenames:
tar.add(filename, arcname=dest_)
tar.add(filename, arcname=filename.name)
else:
raise NotImplementedError(f"archive_fmt={archive_fmt}")
with open(archive_path, "rb") as f:
Expand Down

0 comments on commit 69c974b

Please sign in to comment.