unitlab 2.1.5__tar.gz → 2.1.6__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.
- {unitlab-2.1.5/src/unitlab.egg-info → unitlab-2.1.6}/PKG-INFO +1 -1
- {unitlab-2.1.5 → unitlab-2.1.6}/setup.py +1 -1
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab/client.py +2 -2
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab/main.py +3 -3
- {unitlab-2.1.5 → unitlab-2.1.6/src/unitlab.egg-info}/PKG-INFO +1 -1
- {unitlab-2.1.5 → unitlab-2.1.6}/LICENSE.md +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/README.md +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/setup.cfg +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab/__init__.py +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab/__main__.py +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab/dataset.py +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab/exceptions.py +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab/utils.py +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab.egg-info/SOURCES.txt +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab.egg-info/dependency_links.txt +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab.egg-info/entry_points.txt +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab.egg-info/requires.txt +0 -0
- {unitlab-2.1.5 → unitlab-2.1.6}/src/unitlab.egg-info/top_level.txt +0 -0
@@ -118,7 +118,7 @@ class UnitlabClient:
|
|
118
118
|
def project_members(self, project_id, pretty=0):
|
119
119
|
return self._get(f"/api/sdk/projects/{project_id}/members/?pretty={pretty}")
|
120
120
|
|
121
|
-
def
|
121
|
+
def project_upload_data(self, project_id, directory, batch_size=100):
|
122
122
|
if not os.path.isdir(directory):
|
123
123
|
raise ValueError(f"Directory {directory} does not exist")
|
124
124
|
|
@@ -204,7 +204,7 @@ class UnitlabClient:
|
|
204
204
|
logger.info(f"File: {os.path.abspath(filename)}")
|
205
205
|
return os.path.abspath(filename)
|
206
206
|
|
207
|
-
def
|
207
|
+
def dataset_download_files(self, dataset_id):
|
208
208
|
response = self._post(
|
209
209
|
f"/api/sdk/datasets/{dataset_id}/", data={"download_type": "files"}
|
210
210
|
)
|
@@ -39,7 +39,7 @@ class AnnotationType(str, Enum):
|
|
39
39
|
IMG_POINT = "img_point"
|
40
40
|
|
41
41
|
|
42
|
-
@app.command()
|
42
|
+
@app.command(help="Configure the credentials")
|
43
43
|
def configure(
|
44
44
|
api_key: Annotated[str, typer.Option(help="The api-key obtained from unitlab.ai")],
|
45
45
|
api_url: Annotated[str, typer.Option()] = "https://api.unitlab.ai",
|
@@ -76,7 +76,7 @@ def upload(
|
|
76
76
|
Path, typer.Option(help="Directory containing the data to be uploaded")
|
77
77
|
],
|
78
78
|
):
|
79
|
-
get_client(api_key).
|
79
|
+
get_client(api_key).project_upload_data(str(pk), directory=directory)
|
80
80
|
|
81
81
|
|
82
82
|
@dataset_app.command(name="list", help="List datasets")
|
@@ -145,7 +145,7 @@ def dataset_download(
|
|
145
145
|
"Export type is required when download type is annotation"
|
146
146
|
)
|
147
147
|
get_client(api_key).dataset_download(pk, export_type)
|
148
|
-
get_client(api_key).
|
148
|
+
get_client(api_key).dataset_download_files(pk)
|
149
149
|
|
150
150
|
|
151
151
|
if __name__ == "__main__":
|
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
|