hafnia 0.1.15__tar.gz → 0.1.16__tar.gz

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.
Files changed (61) hide show
  1. {hafnia-0.1.15 → hafnia-0.1.16}/PKG-INFO +1 -1
  2. {hafnia-0.1.15 → hafnia-0.1.16}/pyproject.toml +1 -1
  3. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/experiment_cmds.py +26 -0
  4. {hafnia-0.1.15 → hafnia-0.1.16}/uv.lock +1 -1
  5. {hafnia-0.1.15 → hafnia-0.1.16}/.devcontainer/devcontainer.json +0 -0
  6. {hafnia-0.1.15 → hafnia-0.1.16}/.devcontainer/hooks/post_create +0 -0
  7. {hafnia-0.1.15 → hafnia-0.1.16}/.github/dependabot.yaml +0 -0
  8. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/Dockerfile +0 -0
  9. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/build.yaml +0 -0
  10. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/ci_cd.yaml +0 -0
  11. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/lint.yaml +0 -0
  12. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/publish_docker.yaml +0 -0
  13. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/publish_pypi.yaml +0 -0
  14. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/publish_release.yaml +0 -0
  15. {hafnia-0.1.15 → hafnia-0.1.16}/.github/workflows/tests.yaml +0 -0
  16. {hafnia-0.1.15 → hafnia-0.1.16}/.gitignore +0 -0
  17. {hafnia-0.1.15 → hafnia-0.1.16}/.pre-commit-config.yaml +0 -0
  18. {hafnia-0.1.15 → hafnia-0.1.16}/.python-version +0 -0
  19. {hafnia-0.1.15 → hafnia-0.1.16}/.vscode/extensions.json +0 -0
  20. {hafnia-0.1.15 → hafnia-0.1.16}/.vscode/launch.json +0 -0
  21. {hafnia-0.1.15 → hafnia-0.1.16}/.vscode/settings.json +0 -0
  22. {hafnia-0.1.15 → hafnia-0.1.16}/LICENSE +0 -0
  23. {hafnia-0.1.15 → hafnia-0.1.16}/README.md +0 -0
  24. {hafnia-0.1.15 → hafnia-0.1.16}/docs/cli.md +0 -0
  25. {hafnia-0.1.15 → hafnia-0.1.16}/docs/release.md +0 -0
  26. {hafnia-0.1.15 → hafnia-0.1.16}/docs/s2m.md +0 -0
  27. {hafnia-0.1.15 → hafnia-0.1.16}/examples/dataset_builder.py +0 -0
  28. {hafnia-0.1.15 → hafnia-0.1.16}/examples/example_load_dataset.py +0 -0
  29. {hafnia-0.1.15 → hafnia-0.1.16}/examples/example_logger.py +0 -0
  30. {hafnia-0.1.15 → hafnia-0.1.16}/examples/example_torchvision_dataloader.py +0 -0
  31. {hafnia-0.1.15 → hafnia-0.1.16}/examples/script2model/pytorch/Dockerfile +0 -0
  32. {hafnia-0.1.15 → hafnia-0.1.16}/examples/script2model/pytorch/src/lib/train_utils.py +0 -0
  33. {hafnia-0.1.15 → hafnia-0.1.16}/examples/script2model/pytorch/src/scripts/train.py +0 -0
  34. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/__init__.py +0 -0
  35. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/__main__.py +0 -0
  36. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/config.py +0 -0
  37. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/consts.py +0 -0
  38. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/data_cmds.py +0 -0
  39. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/profile_cmds.py +0 -0
  40. {hafnia-0.1.15 → hafnia-0.1.16}/src/cli/runc_cmds.py +0 -0
  41. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/__init__.py +0 -0
  42. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/data/__init__.py +0 -0
  43. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/data/factory.py +0 -0
  44. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/experiment/__init__.py +0 -0
  45. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/experiment/hafnia_logger.py +0 -0
  46. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/http.py +0 -0
  47. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/log.py +0 -0
  48. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/platform/__init__.py +0 -0
  49. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/platform/api.py +0 -0
  50. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/platform/builder.py +0 -0
  51. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/platform/download.py +0 -0
  52. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/platform/executor.py +0 -0
  53. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/platform/experiment.py +0 -0
  54. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/torch_helpers.py +0 -0
  55. {hafnia-0.1.15 → hafnia-0.1.16}/src/hafnia/utils.py +0 -0
  56. {hafnia-0.1.15 → hafnia-0.1.16}/tests/test_builder.py +0 -0
  57. {hafnia-0.1.15 → hafnia-0.1.16}/tests/test_check_example_scripts.py +0 -0
  58. {hafnia-0.1.15 → hafnia-0.1.16}/tests/test_cli.py +0 -0
  59. {hafnia-0.1.15 → hafnia-0.1.16}/tests/test_executor.py +0 -0
  60. {hafnia-0.1.15 → hafnia-0.1.16}/tests/test_mdi_logger.py +0 -0
  61. {hafnia-0.1.15 → hafnia-0.1.16}/tests/test_samples.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hafnia
3
- Version: 0.1.15
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hafnia"
3
- version = "0.1.15"
3
+ version = "0.1.16"
4
4
  description = "Python tools for communication with Hafnia platform."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Ivan Sahumbaiev", email = "ivsa@milestone.dk" }]
@@ -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)
@@ -549,7 +549,7 @@ http = [
549
549
 
550
550
  [[package]]
551
551
  name = "hafnia"
552
- version = "0.1.15"
552
+ version = "0.1.16"
553
553
  source = { editable = "." }
554
554
  dependencies = [
555
555
  { name = "boto3" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes