hirundo 0.1.18__py3-none-any.whl → 0.2.3.post1__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.
hirundo/cli.py CHANGED
@@ -1,7 +1,6 @@
1
1
  import os
2
2
  import re
3
3
  import sys
4
- import typing
5
4
  from pathlib import Path
6
5
  from typing import Annotated
7
6
  from urllib.parse import urlparse
@@ -28,9 +27,7 @@ app = typer.Typer(
28
27
  )
29
28
 
30
29
 
31
- def _upsert_env(
32
- dotenv_filepath: typing.Union[str, Path], var_name: str, var_value: str
33
- ):
30
+ def _upsert_env(dotenv_filepath: str | Path, var_name: str, var_value: str):
34
31
  """
35
32
  Change an environment variable in the .env file.
36
33
  If the variable does not exist, it will be added.
@@ -88,7 +85,7 @@ def setup_api_key(
88
85
  ],
89
86
  ):
90
87
  """
91
- Setup the API key for the Hirundo client library.
88
+ Setup the API key for the Hirundo Python SDK.
92
89
  Values are saved to a .env file in the current directory for use by the library in requests.
93
90
  """
94
91
  saved_to = upsert_env("API_KEY", api_key)
@@ -115,7 +112,7 @@ def change_api_remote(
115
112
  ],
116
113
  ):
117
114
  """
118
- Change the API server address for the Hirundo client library.
115
+ Change the API server address for the Hirundo Python SDK.
119
116
  This is the same address where you access the Hirundo web interface.
120
117
  """
121
118
  api_host = fix_api_host(api_host)
@@ -151,7 +148,7 @@ def setup(
151
148
  ],
152
149
  ):
153
150
  """
154
- Setup the Hirundo client library.
151
+ Setup the Hirundo Python SDK.
155
152
  """
156
153
  api_host = fix_api_host(api_host)
157
154
  api_host_saved_to = upsert_env("API_HOST", api_host)
@@ -198,9 +195,9 @@ def check_run(
198
195
  """
199
196
  Check the status of a run.
200
197
  """
201
- from hirundo.dataset_optimization import OptimizationDataset
198
+ from hirundo.dataset_qa import QADataset
202
199
 
203
- results = OptimizationDataset.check_run_by_id(run_id)
200
+ results = QADataset.check_run_by_id(run_id)
204
201
  print(f"Run results saved to {results.cached_zip_path}")
205
202
 
206
203
 
@@ -209,9 +206,9 @@ def list_runs():
209
206
  """
210
207
  List all runs available.
211
208
  """
212
- from hirundo.dataset_optimization import OptimizationDataset
209
+ from hirundo.dataset_qa import QADataset
213
210
 
214
- runs = OptimizationDataset.list_runs()
211
+ runs = QADataset.list_runs()
215
212
 
216
213
  console = Console()
217
214
  table = Table(
hirundo/dataset_enum.py CHANGED
@@ -24,6 +24,7 @@ class DatasetMetadataType(str, Enum):
24
24
  HIRUNDO_CSV = "HirundoCSV"
25
25
  COCO = "COCO"
26
26
  YOLO = "YOLO"
27
+ HuggingFaceAudio = "HuggingFaceAudio"
27
28
  KeylabsObjDetImages = "KeylabsObjDetImages"
28
29
  KeylabsObjDetVideo = "KeylabsObjDetVideo"
29
30
  KeylabsObjSegImages = "KeylabsObjSegImages"
@@ -44,3 +45,4 @@ class StorageTypes(str, Enum):
44
45
  """
45
46
  Local storage config is only supported for on-premises installations.
46
47
  """
48
+ HUGGINGFACE = "HuggingFace"