@eyepop.ai/eyepop 1.8.3 → 1.9.1
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.
package/dist/eyepop.index.mjs
CHANGED
|
@@ -10941,6 +10941,11 @@ var ExportedBy = /* @__PURE__ */ ((ExportedBy2) => {
|
|
|
10941
10941
|
ExportedBy2["qc_ai_hub"] = "qc_ai_hub";
|
|
10942
10942
|
return ExportedBy2;
|
|
10943
10943
|
})(ExportedBy || {});
|
|
10944
|
+
var ArtifactType = /* @__PURE__ */ ((ArtifactType3) => {
|
|
10945
|
+
ArtifactType3["eyepop_bundle"] = "eyepop_bundle";
|
|
10946
|
+
ArtifactType3["weights_file"] = "weights_file";
|
|
10947
|
+
return ArtifactType3;
|
|
10948
|
+
})(ArtifactType || {});
|
|
10944
10949
|
var ModelTrainingStage = /* @__PURE__ */ ((ModelTrainingStage2) => {
|
|
10945
10950
|
ModelTrainingStage2["waiting"] = "waiting";
|
|
10946
10951
|
ModelTrainingStage2["scheduling"] = "scheduling";
|
|
@@ -11153,17 +11158,19 @@ var DataEndpoint = class extends Endpoint {
|
|
|
11153
11158
|
if (response.status === 204) {
|
|
11154
11159
|
return null;
|
|
11155
11160
|
}
|
|
11161
|
+
const contentType = response.headers.get("Content-Type");
|
|
11162
|
+
this._requestLogger.debug("Response - " + response.status + " " + response.statusText);
|
|
11156
11163
|
if (!response.ok) {
|
|
11157
|
-
|
|
11158
|
-
|
|
11164
|
+
if (contentType && (contentType.toLowerCase().startsWith("application/json") || contentType.toLowerCase().startsWith("text/"))) {
|
|
11165
|
+
throw new Error(`Request failed with ${response.status} ${response.statusText}: ${await response.text()}`);
|
|
11166
|
+
} else {
|
|
11167
|
+
throw new Error(`Request failed with ${response.status} ${response.statusText}`);
|
|
11168
|
+
}
|
|
11159
11169
|
}
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
const blob = await response.blob();
|
|
11163
|
-
return blob;
|
|
11170
|
+
if (contentType && contentType.toLowerCase().startsWith("application/json")) {
|
|
11171
|
+
return await response.json();
|
|
11164
11172
|
}
|
|
11165
|
-
|
|
11166
|
-
return response.json();
|
|
11173
|
+
return await response.blob();
|
|
11167
11174
|
}
|
|
11168
11175
|
async listDatasets(include_stats = true, modifiable_version_only) {
|
|
11169
11176
|
const modifiableVersionQuery = typeof modifiable_version_only !== "undefined" ? `&modifiable_version_only=${modifiable_version_only}` : "";
|
|
@@ -11392,6 +11399,19 @@ var DataEndpoint = class extends Endpoint {
|
|
|
11392
11399
|
body: JSON.stringify(params)
|
|
11393
11400
|
});
|
|
11394
11401
|
}
|
|
11402
|
+
async downloadModelArtifacts(model_uuid, model_formats, device_name, artifact_type) {
|
|
11403
|
+
const artifactTypeQuery = artifact_type ? `artifact_type=${artifact_type}&` : "";
|
|
11404
|
+
const deviceNameQuery = device_name ? `device_name=${encodeURIComponent(device_name)}&` : "";
|
|
11405
|
+
let modelFormatQuery = "";
|
|
11406
|
+
if (model_formats) {
|
|
11407
|
+
for (const model_format of model_formats) {
|
|
11408
|
+
modelFormatQuery += `model_format=${model_format}&`;
|
|
11409
|
+
}
|
|
11410
|
+
}
|
|
11411
|
+
return this.request(`/exports/model_artifacts/?model_uuid=${model_uuid}&${artifactTypeQuery}${deviceNameQuery}${modelFormatQuery}`, {
|
|
11412
|
+
method: "GET"
|
|
11413
|
+
});
|
|
11414
|
+
}
|
|
11395
11415
|
addAccountEventHandler(eventHandler) {
|
|
11396
11416
|
this._account_event_handlers.push(eventHandler);
|
|
11397
11417
|
}
|
|
@@ -11626,6 +11646,7 @@ var index_default = EyePop;
|
|
|
11626
11646
|
export {
|
|
11627
11647
|
AbstractJob,
|
|
11628
11648
|
AnnotationType,
|
|
11649
|
+
ArtifactType,
|
|
11629
11650
|
AssetStatus,
|
|
11630
11651
|
ChangeType,
|
|
11631
11652
|
ContourType,
|