Skip to content

Commit e4e0296

Browse files
authored
Merge pull request #18 from grok-ai/develop
Version 0.0.7
2 parents 4baa63d + 64273d2 commit e4e0296

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author = Valentino Maiorca
66
author_email = valentino@maiorca.xyz
77
keywords = python, torch
88
license = MIT License
9-
url = https://github.com/Flegyas/nn-template-core
9+
url = https://github.com/grok-ai/nn-template-core
1010

1111
[options]
1212
zip_safe = False

src/nn_core/serialization.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ def compress_checkpoint(src_dir: Path, dst_file: Path, delete_dir: bool = True):
9595
with zipfile.ZipFile(_normalize_path(dst_file), "w") as zip_file:
9696
for folder, subfolders, files in os.walk(src_dir):
9797
folder: Path = Path(folder)
98+
for subfolder in subfolders:
99+
zip_file.write(
100+
folder / subfolder,
101+
(folder / subfolder).relative_to(src_dir),
102+
compress_type=zipfile.ZIP_DEFLATED,
103+
)
104+
98105
for file in files:
99106
zip_file.write(
100107
folder / file,

0 commit comments

Comments
 (0)