hafnia 0.1.14__py3-none-any.whl → 0.1.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cli/experiment_cmds.py +26 -0
- hafnia/torch_helpers.py +0 -1
- {hafnia-0.1.14.dist-info → hafnia-0.1.16.dist-info}/METADATA +2 -1
- {hafnia-0.1.14.dist-info → hafnia-0.1.16.dist-info}/RECORD +7 -7
- {hafnia-0.1.14.dist-info → hafnia-0.1.16.dist-info}/WHEEL +0 -0
- {hafnia-0.1.14.dist-info → hafnia-0.1.16.dist-info}/entry_points.txt +0 -0
- {hafnia-0.1.14.dist-info → hafnia-0.1.16.dist-info}/licenses/LICENSE +0 -0
cli/experiment_cmds.py
CHANGED
|
@@ -13,6 +13,32 @@ def experiment() -> None:
|
|
|
13
13
|
pass
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
@experiment.command(name="create_recipe")
|
|
17
|
+
@click.option("--source_folder", default=".", type=Path, help="Path to the source folder", show_default=True)
|
|
18
|
+
@click.option(
|
|
19
|
+
"--recipe_filename",
|
|
20
|
+
default="recipe.zip",
|
|
21
|
+
type=Path,
|
|
22
|
+
help="Recipe filename. Should have a '.zip' suffix",
|
|
23
|
+
show_default=True,
|
|
24
|
+
)
|
|
25
|
+
def create_recipe(source_folder: str, recipe_filename: str) -> None:
|
|
26
|
+
"""Build recipe from local path as image with prefix - localhost"""
|
|
27
|
+
|
|
28
|
+
from hafnia.platform.builder import validate_recipe
|
|
29
|
+
from hafnia.utils import archive_dir
|
|
30
|
+
|
|
31
|
+
path_output_zip = Path(recipe_filename)
|
|
32
|
+
|
|
33
|
+
if path_output_zip.suffix != ".zip":
|
|
34
|
+
raise click.ClickException("Recipe filename must be a '.zip' file")
|
|
35
|
+
|
|
36
|
+
path_source = Path(source_folder)
|
|
37
|
+
|
|
38
|
+
path_output_zip = archive_dir(path_source, path_output_zip)
|
|
39
|
+
validate_recipe(path_output_zip)
|
|
40
|
+
|
|
41
|
+
|
|
16
42
|
@experiment.command(name="create")
|
|
17
43
|
@click.argument("name")
|
|
18
44
|
@click.argument("source_dir", type=Path)
|
hafnia/torch_helpers.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hafnia
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.16
|
|
4
4
|
Summary: Python tools for communication with Hafnia platform.
|
|
5
5
|
Author-email: Ivan Sahumbaiev <ivsa@milestone.dk>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -8,6 +8,7 @@ Requires-Python: >=3.10
|
|
|
8
8
|
Requires-Dist: boto3>=1.35.91
|
|
9
9
|
Requires-Dist: click>=8.1.8
|
|
10
10
|
Requires-Dist: datasets>=3.2.0
|
|
11
|
+
Requires-Dist: flatten-dict>=0.4.2
|
|
11
12
|
Requires-Dist: pillow>=11.1.0
|
|
12
13
|
Requires-Dist: pyarrow>=18.1.0
|
|
13
14
|
Requires-Dist: pydantic>=2.10.4
|
|
@@ -3,13 +3,13 @@ cli/__main__.py,sha256=h1tOAK15us_dkoMd6Yd4SesVPisojTxOXiYxpLZnatw,1736
|
|
|
3
3
|
cli/config.py,sha256=Js_dCn39l7hLhA3ovHorOyVqj-LCLzUg_figSy4jNjs,5279
|
|
4
4
|
cli/consts.py,sha256=nd9fPTypqCJYJoOp9QifNgj7-c91J-T0dTv83c33g50,892
|
|
5
5
|
cli/data_cmds.py,sha256=FYZPaeTs6WQnTf9b4a56w3SXQ1VAOMF5s8eUDHeNtd4,1538
|
|
6
|
-
cli/experiment_cmds.py,sha256=
|
|
6
|
+
cli/experiment_cmds.py,sha256=d9M8008Z0Y49KIITy73qd5ViPehgMymDVAgsvZhwye0,3099
|
|
7
7
|
cli/profile_cmds.py,sha256=Rg-5wLHSWlZhNPUZBO7LdyJS-Y-SgI6qKLoAac2gSdk,2534
|
|
8
8
|
cli/runc_cmds.py,sha256=fNgPNURXmO4nfLyuorcpqWEeNNuTVsRBHxcIA9FCPts,2197
|
|
9
9
|
hafnia/__init__.py,sha256=Zphq-cQoX95Z11zm4lkrU-YiAJxddR7IBfwDkxeHoDE,108
|
|
10
10
|
hafnia/http.py,sha256=rID6Krn9wRGXwsJYvpffsFlt5cwxFgkcihYppqtdT-8,2974
|
|
11
11
|
hafnia/log.py,sha256=ii--Q6IThsWOluRp_Br9WGhwBtKChU80BXk5pK_NU5A,819
|
|
12
|
-
hafnia/torch_helpers.py,sha256=
|
|
12
|
+
hafnia/torch_helpers.py,sha256=P_Jl4IwqUebKVCOXNe6iTorJZA3S-3d92HV274UHIko,7456
|
|
13
13
|
hafnia/utils.py,sha256=WWWXZPolzncQmSb4onArT1lJyISV0D22eEejrHWePoc,2425
|
|
14
14
|
hafnia/data/__init__.py,sha256=Pntmo_1fst8OhyrHB60jQ8mhJJ4hL38tdjLvt0YXEJo,73
|
|
15
15
|
hafnia/data/factory.py,sha256=61oGQsm1naG_6Nd_UY2teOki8Oiu2F-gT-nGocmqAcg,2992
|
|
@@ -21,8 +21,8 @@ hafnia/platform/builder.py,sha256=VqcbOPxC7HqGAqFMb6ewThBZYLEV5RBgQrVuMd2dbLY,66
|
|
|
21
21
|
hafnia/platform/download.py,sha256=AWnlSYj9FD7GvZ_-9Sw5jrcxi3RyBSSUVph8U9T9ZbQ,4711
|
|
22
22
|
hafnia/platform/executor.py,sha256=HA8IF2ZTZ6ZiRWNjVdIdWKiUa5i8Yoz06mIUBDwzVDk,3759
|
|
23
23
|
hafnia/platform/experiment.py,sha256=JDVsRkMvXO0_hvJSUHaElpnBpmHNCBmIJ4r_cw5LYiA,2185
|
|
24
|
-
hafnia-0.1.
|
|
25
|
-
hafnia-0.1.
|
|
26
|
-
hafnia-0.1.
|
|
27
|
-
hafnia-0.1.
|
|
28
|
-
hafnia-0.1.
|
|
24
|
+
hafnia-0.1.16.dist-info/METADATA,sha256=boGoor9k3TlG2YMU6iCQ8izEMm-1pgRRz4q04FFaDCM,8104
|
|
25
|
+
hafnia-0.1.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
hafnia-0.1.16.dist-info/entry_points.txt,sha256=FCJVIQ8GP2VE9I3eeGVF5eLxVDNW_01pOJCpG_CGnMM,45
|
|
27
|
+
hafnia-0.1.16.dist-info/licenses/LICENSE,sha256=DqQ3NOAy7Efwppv0IAVXEm3Za2SI_1OuDfG20ab8eQw,1078
|
|
28
|
+
hafnia-0.1.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|