hafnia 0.2.4__py3-none-any.whl → 0.4.0__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/__main__.py +16 -3
- cli/config.py +45 -4
- cli/consts.py +1 -1
- cli/dataset_cmds.py +6 -14
- cli/dataset_recipe_cmds.py +78 -0
- cli/experiment_cmds.py +226 -43
- cli/keychain.py +88 -0
- cli/profile_cmds.py +10 -6
- cli/runc_cmds.py +5 -5
- cli/trainer_package_cmds.py +65 -0
- hafnia/__init__.py +2 -0
- hafnia/data/factory.py +1 -2
- hafnia/dataset/dataset_helpers.py +9 -14
- hafnia/dataset/dataset_names.py +10 -5
- hafnia/dataset/dataset_recipe/dataset_recipe.py +165 -67
- hafnia/dataset/dataset_recipe/recipe_transforms.py +48 -4
- hafnia/dataset/dataset_recipe/recipe_types.py +1 -1
- hafnia/dataset/dataset_upload_helper.py +265 -56
- hafnia/dataset/format_conversions/image_classification_from_directory.py +106 -0
- hafnia/dataset/format_conversions/torchvision_datasets.py +281 -0
- hafnia/dataset/hafnia_dataset.py +577 -213
- hafnia/dataset/license_types.py +63 -0
- hafnia/dataset/operations/dataset_stats.py +259 -3
- hafnia/dataset/operations/dataset_transformations.py +332 -7
- hafnia/dataset/operations/table_transformations.py +43 -5
- hafnia/dataset/primitives/__init__.py +8 -0
- hafnia/dataset/primitives/bbox.py +25 -12
- hafnia/dataset/primitives/bitmask.py +26 -14
- hafnia/dataset/primitives/classification.py +16 -8
- hafnia/dataset/primitives/point.py +7 -3
- hafnia/dataset/primitives/polygon.py +16 -9
- hafnia/dataset/primitives/segmentation.py +10 -7
- hafnia/experiment/hafnia_logger.py +111 -8
- hafnia/http.py +16 -2
- hafnia/platform/__init__.py +9 -3
- hafnia/platform/builder.py +12 -10
- hafnia/platform/dataset_recipe.py +104 -0
- hafnia/platform/datasets.py +47 -9
- hafnia/platform/download.py +25 -19
- hafnia/platform/experiment.py +51 -56
- hafnia/platform/trainer_package.py +57 -0
- hafnia/utils.py +81 -13
- hafnia/visualizations/image_visualizations.py +4 -4
- {hafnia-0.2.4.dist-info → hafnia-0.4.0.dist-info}/METADATA +40 -34
- hafnia-0.4.0.dist-info/RECORD +56 -0
- cli/recipe_cmds.py +0 -45
- hafnia-0.2.4.dist-info/RECORD +0 -49
- {hafnia-0.2.4.dist-info → hafnia-0.4.0.dist-info}/WHEEL +0 -0
- {hafnia-0.2.4.dist-info → hafnia-0.4.0.dist-info}/entry_points.txt +0 -0
- {hafnia-0.2.4.dist-info → hafnia-0.4.0.dist-info}/licenses/LICENSE +0 -0
cli/recipe_cmds.py
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
import click
|
|
4
|
-
|
|
5
|
-
import cli.consts as consts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@click.group(name="recipe")
|
|
9
|
-
def recipe() -> None:
|
|
10
|
-
"""Hafnia Recipe management commands"""
|
|
11
|
-
pass
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@recipe.command(name="create")
|
|
15
|
-
@click.argument("source")
|
|
16
|
-
@click.option(
|
|
17
|
-
"--output", type=click.Path(writable=True), default="./recipe.zip", show_default=True, help="Output recipe path."
|
|
18
|
-
)
|
|
19
|
-
def create(source: str, output: str) -> None:
|
|
20
|
-
"""Create HRF from local path"""
|
|
21
|
-
|
|
22
|
-
from hafnia.utils import archive_dir
|
|
23
|
-
|
|
24
|
-
path_output_zip = Path(output)
|
|
25
|
-
if path_output_zip.suffix != ".zip":
|
|
26
|
-
raise click.ClickException(consts.ERROR_RECIPE_FILE_FORMAT)
|
|
27
|
-
|
|
28
|
-
path_source = Path(source)
|
|
29
|
-
path_output_zip = archive_dir(path_source, path_output_zip)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@recipe.command(name="view")
|
|
33
|
-
@click.option("--path", type=str, default="./recipe.zip", show_default=True, help="Path of recipe.zip.")
|
|
34
|
-
@click.option("--depth-limit", type=int, default=3, help="Limit the depth of the tree view.", show_default=True)
|
|
35
|
-
def view(path: str, depth_limit: int) -> None:
|
|
36
|
-
"""View the content of a recipe zip file."""
|
|
37
|
-
from hafnia.utils import show_recipe_content
|
|
38
|
-
|
|
39
|
-
path_recipe = Path(path)
|
|
40
|
-
if not path_recipe.exists():
|
|
41
|
-
raise click.ClickException(
|
|
42
|
-
f"Recipe file '{path_recipe}' does not exist. Please provide a valid path. "
|
|
43
|
-
f"To create a recipe, use the 'hafnia recipe create' command."
|
|
44
|
-
)
|
|
45
|
-
show_recipe_content(path_recipe, depth_limit=depth_limit)
|
hafnia-0.2.4.dist-info/RECORD
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
cli/__main__.py,sha256=WPOiwolX6J5qLBQGv_b64PGYWScrwqbdVh5zs5AbzVk,1436
|
|
3
|
-
cli/config.py,sha256=hkVd1WyrRqLBgJbKWJkXBzRWlvBRr8dt_8f722yZiiM,6063
|
|
4
|
-
cli/consts.py,sha256=sj0MRwbbCT2Yl77FPddck1VWkFxp7QY6I9l1o75j_aE,963
|
|
5
|
-
cli/dataset_cmds.py,sha256=VUMhnHGYPtNNJUK9aobKTx2zpVzLex4gTMmyQXuzCVw,1623
|
|
6
|
-
cli/experiment_cmds.py,sha256=L-k_ZJ4B7I4cA8OvHcheSwXM6nx9aTF9G7eKBzAcOzQ,1961
|
|
7
|
-
cli/profile_cmds.py,sha256=qop9hW4EjbTEQ5d28tiIHCaG6iUM9opQcj289qI-tkg,3220
|
|
8
|
-
cli/recipe_cmds.py,sha256=qnMfF-te47HXNkgyA0hm9X3etDQsqMnrVEGDCrzVjZU,1462
|
|
9
|
-
cli/runc_cmds.py,sha256=QqhQe2sd7tK1Bl2aGfIWRyJjpP6F7Tducg7HULrHsZ4,4958
|
|
10
|
-
hafnia/__init__.py,sha256=Zphq-cQoX95Z11zm4lkrU-YiAJxddR7IBfwDkxeHoDE,108
|
|
11
|
-
hafnia/http.py,sha256=HoPB03IL6e-nglTrw1NGT6sDx1T8VNas5HjTT1QZHnU,3035
|
|
12
|
-
hafnia/log.py,sha256=sWF8tz78yBtwZ9ddzm19L1MBSBJ3L4G704IGeT1_OEU,784
|
|
13
|
-
hafnia/torch_helpers.py,sha256=ho65B0WIu_SjbaKPRL4wabDNrnVumWH8QSXVH4r7NAY,11605
|
|
14
|
-
hafnia/utils.py,sha256=aTZaeHldXn4Jx_AR2BYATxtLCRrBKBjjDFmpSZTSvV4,5138
|
|
15
|
-
hafnia/data/__init__.py,sha256=o9QjiGbEcNa6r-qDmwwmxPXf-1UitNl5-WxFNcujqsg,111
|
|
16
|
-
hafnia/data/factory.py,sha256=OY6l6c9UKk6OUDhG4Akb2VgcSaTRLHlbSndAe1HuW2U,813
|
|
17
|
-
hafnia/dataset/dataset_helpers.py,sha256=x6jub_aLWJn-sWSvXT_0-nwzzPG1xMM9yBMNDx6Nufw,5190
|
|
18
|
-
hafnia/dataset/dataset_names.py,sha256=mp7A_TOqgoqHUEBCPC4ReKNJ93cxwQB451owoCqD6yM,2120
|
|
19
|
-
hafnia/dataset/dataset_upload_helper.py,sha256=D1BGaeEar4McpUvXj4Yy8nk1tr12IEVhP_Ma47OoWmU,21150
|
|
20
|
-
hafnia/dataset/hafnia_dataset.py,sha256=6yy13mU9OnJfIoG8R1ZS7mmkNR_VKOD9B4L2KjdS76I,27078
|
|
21
|
-
hafnia/dataset/dataset_recipe/dataset_recipe.py,sha256=3rMMd1xlfQzElxF9P2uNyKqK-GjbCADZgcFDoPviTmU,15796
|
|
22
|
-
hafnia/dataset/dataset_recipe/recipe_transforms.py,sha256=wh1y2XyX0PwOwfuzJ3_17KKng2Rk0zLlgdfSHfS1SyM,1305
|
|
23
|
-
hafnia/dataset/dataset_recipe/recipe_types.py,sha256=breT8x81FcmiZ82U_D9FBut0F-eWwOeBWBOse9kNAYU,5256
|
|
24
|
-
hafnia/dataset/operations/dataset_stats.py,sha256=tSHPmkXt4WNgjf5-j3jIrsSy1Ajld3619AkUHaesXb4,445
|
|
25
|
-
hafnia/dataset/operations/dataset_transformations.py,sha256=4ibC11upEtRGJgoFLv8lUnglv2xANZVfNdsvI1BMvfM,2960
|
|
26
|
-
hafnia/dataset/operations/table_transformations.py,sha256=kCLbLRdiFSx1JG0IWtaKkhWcMtM7hy8zgm0Ehz0zO_g,7639
|
|
27
|
-
hafnia/dataset/primitives/__init__.py,sha256=LAdTeK5GgmaF1se8f0Yj1lOTNqplXGL87kLeOnv1D8Q,627
|
|
28
|
-
hafnia/dataset/primitives/bbox.py,sha256=HXYYy5BLNZwh-bO7aiAWg3z0OurUev8ISa-vYey8b8A,6055
|
|
29
|
-
hafnia/dataset/primitives/bitmask.py,sha256=mq_wchMqGupJDc-a-mJh9uBO_mjHcXpLH49g591doAM,7619
|
|
30
|
-
hafnia/dataset/primitives/classification.py,sha256=7UmePtrf3imfU56YUro21JvHGoktomMous1vTVKLjHU,2341
|
|
31
|
-
hafnia/dataset/primitives/point.py,sha256=JCRwb-E4sDafodkg6wqyuAS1Yj-yaJbwiD8aB69_Ros,635
|
|
32
|
-
hafnia/dataset/primitives/polygon.py,sha256=vhPrYHv6TqQZMTAyv9r3NV8Hu6YRSSD0srB0wOCIwQ4,4289
|
|
33
|
-
hafnia/dataset/primitives/primitive.py,sha256=7jxcyFADVGf95pjeQHEOqAnR9eucLpxA2h8Blz3ppXI,1253
|
|
34
|
-
hafnia/dataset/primitives/segmentation.py,sha256=jUMjOmYr9j4An3YSCw5CJC1W8ihXAbus3CXaTOpc7Xw,1905
|
|
35
|
-
hafnia/dataset/primitives/utils.py,sha256=3gT1as-xXEj8CamoIuBb9gQwUN9Ae9qnqtqF_uEe0zo,1993
|
|
36
|
-
hafnia/experiment/__init__.py,sha256=OEFE6HqhO5zcTCLZcPcPVjIg7wMFFnvZ1uOtAVhRz7M,85
|
|
37
|
-
hafnia/experiment/hafnia_logger.py,sha256=dnV3VPzJK7DSeUh0g4Hk9w1g-eSXcVqJD9If0h2d2GE,6885
|
|
38
|
-
hafnia/platform/__init__.py,sha256=zJsR6Hy_0iUcC9xL-lBnqR0mLfF4EUr_VXa_XQA7SlA,455
|
|
39
|
-
hafnia/platform/builder.py,sha256=_g8ykQWETz5Y4Np9QU1a6wIzbbJwXCkbiOCA6JcF5Rc,5742
|
|
40
|
-
hafnia/platform/datasets.py,sha256=FPDoRDR1aLIqp2paXy7ThE2-1CfwxX8WZr327GPGFnM,7705
|
|
41
|
-
hafnia/platform/download.py,sha256=oJzdxSIDTuw1an7maC6I7A5nZvDaZPhUkuAmyRwN9Kc,6843
|
|
42
|
-
hafnia/platform/experiment.py,sha256=-nAfTmn1c8sE6pHDCTNZvWDTopkXndarJAPIGvsnk60,2389
|
|
43
|
-
hafnia/visualizations/colors.py,sha256=003eAJVnBal4abaYIIpsrT7erIOIjTUHHYVJ1Tj1CDc,5226
|
|
44
|
-
hafnia/visualizations/image_visualizations.py,sha256=RuFFj2fJCm9dxl2Lq0MumJHF81ZnX-IsDsTxm8ZFV9A,7313
|
|
45
|
-
hafnia-0.2.4.dist-info/METADATA,sha256=8sP2loU7KuxgK0FjvAigfs0TWl302a4BOhpwOEelyGs,19040
|
|
46
|
-
hafnia-0.2.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
47
|
-
hafnia-0.2.4.dist-info/entry_points.txt,sha256=FCJVIQ8GP2VE9I3eeGVF5eLxVDNW_01pOJCpG_CGnMM,45
|
|
48
|
-
hafnia-0.2.4.dist-info/licenses/LICENSE,sha256=wLZw1B7_mod_CO1H8LXqQgfqlWD6QceJR8--LJYRZGE,1078
|
|
49
|
-
hafnia-0.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|