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/__init__.py +28 -8
- hirundo/_constraints.py +3 -4
- hirundo/_headers.py +1 -1
- hirundo/_http.py +53 -0
- hirundo/_iter_sse_retrying.py +8 -5
- hirundo/_llm_pipeline.py +153 -0
- hirundo/_run_checking.py +283 -0
- hirundo/_urls.py +1 -0
- hirundo/cli.py +8 -11
- hirundo/dataset_enum.py +2 -0
- hirundo/{dataset_optimization.py → dataset_qa.py} +213 -256
- hirundo/{dataset_optimization_results.py → dataset_qa_results.py} +7 -7
- hirundo/git.py +8 -10
- hirundo/labeling.py +22 -19
- hirundo/storage.py +26 -26
- hirundo/unlearning_llm.py +599 -0
- hirundo/unzip.py +12 -13
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/METADATA +59 -20
- hirundo-0.2.3.post1.dist-info/RECORD +28 -0
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/WHEEL +1 -1
- hirundo-0.1.18.dist-info/RECORD +0 -25
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/entry_points.txt +0 -0
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/licenses/LICENSE +0 -0
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/top_level.txt +0 -0
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
|
|
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
|
|
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
|
|
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.
|
|
198
|
+
from hirundo.dataset_qa import QADataset
|
|
202
199
|
|
|
203
|
-
results =
|
|
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.
|
|
209
|
+
from hirundo.dataset_qa import QADataset
|
|
213
210
|
|
|
214
|
-
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"
|