@camstack/addon-training 0.1.23 → 0.1.26
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/MaskShapeCanvas-Kfg9dl6B.mjs +686 -0
- package/dist/MotionZonesSettings-0RO2vXPR.mjs +292 -0
- package/dist/{PrivacyMaskSettings-CM_WsrKB.mjs → PrivacyMaskSettings-DQUoMnuu.mjs} +45 -70
- package/dist/ReactKonva-DGuYUN0L.mjs +5416 -0
- package/dist/{SceneMonitorEditor-B-sAJ--C.mjs → SceneMonitorEditor-C3FOjEom.mjs} +311 -311
- package/dist/_stub.js +16427 -6989
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-DKblQaAP.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-CkXUIAzx.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-OmGE1nuE.mjs +26 -0
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DpjirGmB.mjs +89 -0
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CFCVuRAs.mjs +58 -0
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-BkvDudqY.mjs +62 -0
- package/dist/{_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-BT_wL8s3.mjs → _virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs} +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs +34 -0
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_2_dom__loadShare__.js-DAZkHxxU.mjs +45 -0
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-CHqN9NLt.mjs +34 -0
- package/dist/{dist-DwF1P1v7.js → dist-5IcZ6clu.js} +22 -22
- package/dist/{dist-CVDWIKl7.mjs → dist-BT11nKlQ.mjs} +22 -22
- package/dist/grid-2x2-Dip9973H.mjs +21 -0
- package/dist/{hostInit-Di0tDODX.mjs → hostInit-CRpxjzVt.mjs} +2 -2
- package/dist/index.js +1 -1
- package/dist/lib-CVGFTwe0.mjs +7770 -0
- package/dist/orchestrator/training.addon.js +1 -1
- package/dist/orchestrator/training.addon.mjs +1 -1
- package/dist/{player-overlays-BFAqW2L1.mjs → player-overlays-ChonJUSb.mjs} +32 -10
- package/dist/providers/modal/training-modal.addon.js +113 -27
- package/dist/providers/modal/training-modal.addon.mjs +113 -27
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BBlQWFFi.mjs → responsive-vGH-n9E5.mjs} +42 -38
- package/dist/{scene-monitor-copy-D5mKGqt0.mjs → scene-monitor-copy-Bv7SdZp4.mjs} +4 -4
- package/dist/{square-D0FYSm8b.mjs → square-CT7zu_EB.mjs} +29 -4
- package/dist/{trash-2-DdjGvgDw.mjs → trash-2-JjHVW2_2.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-Dw400Y0a.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C_ftN9dQ.mjs} +399 -390
- package/package.json +1 -1
- package/dist/MaskShapeCanvas-BokARvOj.mjs +0 -13806
- package/dist/MotionZonesSettings-CwGjtvsX.mjs +0 -310
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-ff7X-Xlf.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BSOdwqcC.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-B3rryujf.mjs +0 -25
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-nL4MGFRP.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DDBEvLdo.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_2_dom__loadShare__.js-CK-LlgOt.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-gTIQrhKs.mjs +0 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../dist-
|
|
2
|
+
const require_dist = require("../dist-5IcZ6clu.js");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_dist.__toESM(node_path);
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as addonPagesSourceCapability, i as TrainingResultSchema, l as BaseAddon, n as TrainingJobSchema, o as parseTrainingEventLine, r as TrainingJobSpecSchema, s as trainingCapability, t as TRAINING_JOB_SCHEMA } from "../dist-
|
|
1
|
+
import { a as addonPagesSourceCapability, i as TrainingResultSchema, l as BaseAddon, n as TrainingJobSchema, o as parseTrainingEventLine, r as TrainingJobSpecSchema, s as trainingCapability, t as TRAINING_JOB_SCHEMA } from "../dist-BT11nKlQ.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { createReadStream } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-
|
|
4
|
-
var l =
|
|
1
|
+
import { S as e, _ as t, l as n, u as r } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
|
|
2
|
+
import { b as i, y as a } from "./responsive-vGH-n9E5.mjs";
|
|
3
|
+
import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
|
|
4
|
+
var l = i("chevron-down", [["path", {
|
|
5
5
|
d: "m6 9 6 6 6-6",
|
|
6
6
|
key: "qrunsl"
|
|
7
|
-
}]]), u =
|
|
7
|
+
}]]), u = i("chevron-right", [["path", {
|
|
8
8
|
d: "m9 18 6-6-6-6",
|
|
9
9
|
key: "mthhwq"
|
|
10
10
|
}]]);
|
|
@@ -32,13 +32,35 @@ function d({ title: e, icon: n, headerRight: r, collapsible: i = !1, defaultOpen
|
|
|
32
32
|
}) : null]
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
e
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
function f({ label: e, icon: t, children: n, footer: r }) {
|
|
36
|
+
return /* @__PURE__ */ s("div", {
|
|
37
|
+
className: "min-w-0 rounded-lg border border-border bg-surface p-2 sm:p-2.5",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ s("div", {
|
|
40
|
+
className: "mb-0.5 flex min-w-0 items-center gap-1.5 text-[10px] uppercase tracking-wider text-foreground-subtle",
|
|
41
|
+
children: [t, /* @__PURE__ */ o("span", {
|
|
42
|
+
className: "min-w-0 truncate",
|
|
43
|
+
children: e
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ o("div", {
|
|
47
|
+
className: "truncate text-lg font-semibold leading-tight text-foreground",
|
|
48
|
+
children: n
|
|
49
|
+
}),
|
|
50
|
+
r == null ? null : /* @__PURE__ */ o("div", {
|
|
51
|
+
className: "mt-0.5 truncate text-[10px] text-foreground-subtle",
|
|
52
|
+
children: r
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
e(), a("camstack:player-overlays-state", null);
|
|
58
|
+
var p = a("camstack:player-overlays-actions", null);
|
|
59
|
+
function m(e) {
|
|
60
|
+
let t = n(p);
|
|
39
61
|
r(() => {
|
|
40
62
|
if (!(!t || !e)) return t.setLayer(e), () => t.removeLayer(e.id);
|
|
41
63
|
}, [t, e]);
|
|
42
64
|
}
|
|
43
65
|
//#endregion
|
|
44
|
-
export { l as i,
|
|
66
|
+
export { l as a, u as i, f as n, d as r, m as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../../dist-
|
|
2
|
+
const require_dist = require("../../dist-5IcZ6clu.js");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_dist.__toESM(node_path, 1);
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -300,20 +300,6 @@ function trainerDockerfileUrl(repo, revision) {
|
|
|
300
300
|
return `https://huggingface.co/${repo}/resolve/${revision}/Dockerfile`;
|
|
301
301
|
}
|
|
302
302
|
//#endregion
|
|
303
|
-
//#region src/providers/modal/modal-gateway.ts
|
|
304
|
-
var MODAL_APP_NAME = "camstack-training";
|
|
305
|
-
var MODAL_CACHE_VOLUME = "camstack-training-cache";
|
|
306
|
-
/** A small public image with `sh` and `cat`, for the staging / collector sandboxes. */
|
|
307
|
-
var MODAL_TOOLS_IMAGE = "alpine:3.20";
|
|
308
|
-
var ModalAuthError = class extends Error {
|
|
309
|
-
reason;
|
|
310
|
-
constructor(reason, message) {
|
|
311
|
-
super(message);
|
|
312
|
-
this.reason = reason;
|
|
313
|
-
this.name = "ModalAuthError";
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
//#endregion
|
|
317
303
|
//#region src/providers/modal/modal-pricing.ts
|
|
318
304
|
var MODAL_GPUS = [
|
|
319
305
|
{
|
|
@@ -391,6 +377,96 @@ function modalPricePerSecond(gpuType, region) {
|
|
|
391
377
|
return gpu === void 0 ? 0 : gpu.usdPerHour * multiplier / 3600;
|
|
392
378
|
}
|
|
393
379
|
//#endregion
|
|
380
|
+
//#region src/providers/modal/modal-entry-schema.ts
|
|
381
|
+
var MODAL_ENTRY_CONFIG_SCHEMA = { sections: [{
|
|
382
|
+
id: "credentials",
|
|
383
|
+
title: "Credentials",
|
|
384
|
+
fields: [
|
|
385
|
+
{
|
|
386
|
+
type: "text",
|
|
387
|
+
key: "tokenId",
|
|
388
|
+
label: "Token id",
|
|
389
|
+
placeholder: "ak-…"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
type: "password",
|
|
393
|
+
key: "tokenSecret",
|
|
394
|
+
label: "Token secret",
|
|
395
|
+
placeholder: "as-…",
|
|
396
|
+
showToggle: true
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
type: "text",
|
|
400
|
+
key: "environment",
|
|
401
|
+
label: "Environment",
|
|
402
|
+
placeholder: "Optional workspace environment"
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
}, {
|
|
406
|
+
id: "defaults",
|
|
407
|
+
title: "Defaults",
|
|
408
|
+
fields: [
|
|
409
|
+
{
|
|
410
|
+
type: "select",
|
|
411
|
+
key: "gpuType",
|
|
412
|
+
label: "GPU",
|
|
413
|
+
default: "L4",
|
|
414
|
+
options: MODAL_GPUS.map((g) => ({
|
|
415
|
+
value: g.id,
|
|
416
|
+
label: g.label
|
|
417
|
+
}))
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
type: "select",
|
|
421
|
+
key: "region",
|
|
422
|
+
label: "Region",
|
|
423
|
+
default: "",
|
|
424
|
+
options: MODAL_REGIONS.map((r) => ({
|
|
425
|
+
value: r.id,
|
|
426
|
+
label: r.label
|
|
427
|
+
}))
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
type: "number",
|
|
431
|
+
key: "costCapUsd",
|
|
432
|
+
label: "Cost cap (USD)",
|
|
433
|
+
default: 5,
|
|
434
|
+
min: 0,
|
|
435
|
+
step: .5
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
type: "number",
|
|
439
|
+
key: "maxRuntimeHours",
|
|
440
|
+
label: "Max runtime (hours)",
|
|
441
|
+
default: 4,
|
|
442
|
+
min: .1,
|
|
443
|
+
step: .5
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
type: "number",
|
|
447
|
+
key: "failedDatasetGraceHours",
|
|
448
|
+
label: "Failed-job dataset grace (hours)",
|
|
449
|
+
default: 24,
|
|
450
|
+
min: 0,
|
|
451
|
+
step: 1
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
}] };
|
|
455
|
+
//#endregion
|
|
456
|
+
//#region src/providers/modal/modal-gateway.ts
|
|
457
|
+
var MODAL_APP_NAME = "camstack-training";
|
|
458
|
+
var MODAL_CACHE_VOLUME = "camstack-training-cache";
|
|
459
|
+
/** A small public image with `sh` and `cat`, for the staging / collector sandboxes. */
|
|
460
|
+
var MODAL_TOOLS_IMAGE = "alpine:3.20";
|
|
461
|
+
var ModalAuthError = class extends Error {
|
|
462
|
+
reason;
|
|
463
|
+
constructor(reason, message) {
|
|
464
|
+
super(message);
|
|
465
|
+
this.reason = reason;
|
|
466
|
+
this.name = "ModalAuthError";
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
//#endregion
|
|
394
470
|
//#region src/providers/modal/modal-provider.ts
|
|
395
471
|
/**
|
|
396
472
|
* The Modal `training-provider` (D807), over {@link ModalGateway}.
|
|
@@ -440,7 +516,8 @@ var ModalTrainingProvider = class {
|
|
|
440
516
|
typeId: MODAL_TYPE_ID,
|
|
441
517
|
label: "Modal",
|
|
442
518
|
iconAsset: MODAL_ICON_ASSET,
|
|
443
|
-
addonId: this.deps.addonId
|
|
519
|
+
addonId: this.deps.addonId,
|
|
520
|
+
configSchema: MODAL_ENTRY_CONFIG_SCHEMA
|
|
444
521
|
}];
|
|
445
522
|
listEntries = async () => this.deps.listEntries().map((entry) => ({
|
|
446
523
|
entryId: entry.id,
|
|
@@ -746,8 +823,11 @@ var ModalTrainingProvider = class {
|
|
|
746
823
|
return (entry.tokenId ?? "").trim() !== "" && secret.trim() !== "";
|
|
747
824
|
}
|
|
748
825
|
descriptorOf(entry, tokenSecretView) {
|
|
749
|
-
const
|
|
750
|
-
const
|
|
826
|
+
const gpuType = entry.gpuType ?? "L4";
|
|
827
|
+
const region = entry.region ?? "";
|
|
828
|
+
const costCapUsd = entry.costCapUsd ?? 5;
|
|
829
|
+
const maxRuntimeHours = entry.maxRuntimeHours ?? 4;
|
|
830
|
+
const failedDatasetGraceHours = entry.failedDatasetGraceHours ?? 24;
|
|
751
831
|
return {
|
|
752
832
|
addonId: this.deps.addonId,
|
|
753
833
|
entryId: entry.id,
|
|
@@ -764,16 +844,22 @@ var ModalTrainingProvider = class {
|
|
|
764
844
|
dataResidencyNote: "Modal keeps the frames on a Volume of your workspace for the length of the job; the training container sees them only while it runs.",
|
|
765
845
|
configured: this.entryConfigured(entry),
|
|
766
846
|
defaults: {
|
|
767
|
-
gpuType
|
|
768
|
-
region
|
|
769
|
-
costCapUsd
|
|
770
|
-
maxRuntimeSec: Math.round(
|
|
771
|
-
failedDatasetGraceHours
|
|
847
|
+
gpuType,
|
|
848
|
+
region,
|
|
849
|
+
costCapUsd,
|
|
850
|
+
maxRuntimeSec: Math.round(maxRuntimeHours * 3600),
|
|
851
|
+
failedDatasetGraceHours
|
|
772
852
|
},
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
853
|
+
formValues: {
|
|
854
|
+
tokenId: entry.tokenId ?? "",
|
|
855
|
+
tokenSecret: tokenSecretView ?? "",
|
|
856
|
+
environment: entry.environment ?? "",
|
|
857
|
+
gpuType,
|
|
858
|
+
region,
|
|
859
|
+
costCapUsd,
|
|
860
|
+
maxRuntimeHours,
|
|
861
|
+
failedDatasetGraceHours
|
|
862
|
+
}
|
|
777
863
|
};
|
|
778
864
|
}
|
|
779
865
|
requireGateway(entryId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as number, b as string, c as trainingProviderCapability, d as arrayItemFieldPath, f as globalSecretScope, g as boolean, h as toSecretFieldView, l as BaseAddon, m as isSecretMarker, p as isSecretClear, u as SECRET_CLEAR, v as object, y as record } from "../../dist-
|
|
1
|
+
import { _ as number, b as string, c as trainingProviderCapability, d as arrayItemFieldPath, f as globalSecretScope, g as boolean, h as toSecretFieldView, l as BaseAddon, m as isSecretMarker, p as isSecretClear, u as SECRET_CLEAR, v as object, y as record } from "../../dist-BT11nKlQ.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path, { dirname, posix } from "node:path";
|
|
4
4
|
import { createHash, createPrivateKey, createPublicKey, createSign, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -328,20 +328,6 @@ function trainerDockerfileUrl(repo, revision) {
|
|
|
328
328
|
return `https://huggingface.co/${repo}/resolve/${revision}/Dockerfile`;
|
|
329
329
|
}
|
|
330
330
|
//#endregion
|
|
331
|
-
//#region src/providers/modal/modal-gateway.ts
|
|
332
|
-
var MODAL_APP_NAME = "camstack-training";
|
|
333
|
-
var MODAL_CACHE_VOLUME = "camstack-training-cache";
|
|
334
|
-
/** A small public image with `sh` and `cat`, for the staging / collector sandboxes. */
|
|
335
|
-
var MODAL_TOOLS_IMAGE = "alpine:3.20";
|
|
336
|
-
var ModalAuthError = class extends Error {
|
|
337
|
-
reason;
|
|
338
|
-
constructor(reason, message) {
|
|
339
|
-
super(message);
|
|
340
|
-
this.reason = reason;
|
|
341
|
-
this.name = "ModalAuthError";
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
//#endregion
|
|
345
331
|
//#region src/providers/modal/modal-pricing.ts
|
|
346
332
|
var MODAL_GPUS = [
|
|
347
333
|
{
|
|
@@ -419,6 +405,96 @@ function modalPricePerSecond(gpuType, region) {
|
|
|
419
405
|
return gpu === void 0 ? 0 : gpu.usdPerHour * multiplier / 3600;
|
|
420
406
|
}
|
|
421
407
|
//#endregion
|
|
408
|
+
//#region src/providers/modal/modal-entry-schema.ts
|
|
409
|
+
var MODAL_ENTRY_CONFIG_SCHEMA = { sections: [{
|
|
410
|
+
id: "credentials",
|
|
411
|
+
title: "Credentials",
|
|
412
|
+
fields: [
|
|
413
|
+
{
|
|
414
|
+
type: "text",
|
|
415
|
+
key: "tokenId",
|
|
416
|
+
label: "Token id",
|
|
417
|
+
placeholder: "ak-…"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
type: "password",
|
|
421
|
+
key: "tokenSecret",
|
|
422
|
+
label: "Token secret",
|
|
423
|
+
placeholder: "as-…",
|
|
424
|
+
showToggle: true
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
type: "text",
|
|
428
|
+
key: "environment",
|
|
429
|
+
label: "Environment",
|
|
430
|
+
placeholder: "Optional workspace environment"
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
}, {
|
|
434
|
+
id: "defaults",
|
|
435
|
+
title: "Defaults",
|
|
436
|
+
fields: [
|
|
437
|
+
{
|
|
438
|
+
type: "select",
|
|
439
|
+
key: "gpuType",
|
|
440
|
+
label: "GPU",
|
|
441
|
+
default: "L4",
|
|
442
|
+
options: MODAL_GPUS.map((g) => ({
|
|
443
|
+
value: g.id,
|
|
444
|
+
label: g.label
|
|
445
|
+
}))
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
type: "select",
|
|
449
|
+
key: "region",
|
|
450
|
+
label: "Region",
|
|
451
|
+
default: "",
|
|
452
|
+
options: MODAL_REGIONS.map((r) => ({
|
|
453
|
+
value: r.id,
|
|
454
|
+
label: r.label
|
|
455
|
+
}))
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
type: "number",
|
|
459
|
+
key: "costCapUsd",
|
|
460
|
+
label: "Cost cap (USD)",
|
|
461
|
+
default: 5,
|
|
462
|
+
min: 0,
|
|
463
|
+
step: .5
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
type: "number",
|
|
467
|
+
key: "maxRuntimeHours",
|
|
468
|
+
label: "Max runtime (hours)",
|
|
469
|
+
default: 4,
|
|
470
|
+
min: .1,
|
|
471
|
+
step: .5
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
type: "number",
|
|
475
|
+
key: "failedDatasetGraceHours",
|
|
476
|
+
label: "Failed-job dataset grace (hours)",
|
|
477
|
+
default: 24,
|
|
478
|
+
min: 0,
|
|
479
|
+
step: 1
|
|
480
|
+
}
|
|
481
|
+
]
|
|
482
|
+
}] };
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region src/providers/modal/modal-gateway.ts
|
|
485
|
+
var MODAL_APP_NAME = "camstack-training";
|
|
486
|
+
var MODAL_CACHE_VOLUME = "camstack-training-cache";
|
|
487
|
+
/** A small public image with `sh` and `cat`, for the staging / collector sandboxes. */
|
|
488
|
+
var MODAL_TOOLS_IMAGE = "alpine:3.20";
|
|
489
|
+
var ModalAuthError = class extends Error {
|
|
490
|
+
reason;
|
|
491
|
+
constructor(reason, message) {
|
|
492
|
+
super(message);
|
|
493
|
+
this.reason = reason;
|
|
494
|
+
this.name = "ModalAuthError";
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
//#endregion
|
|
422
498
|
//#region src/providers/modal/modal-provider.ts
|
|
423
499
|
/**
|
|
424
500
|
* The Modal `training-provider` (D807), over {@link ModalGateway}.
|
|
@@ -468,7 +544,8 @@ var ModalTrainingProvider = class {
|
|
|
468
544
|
typeId: MODAL_TYPE_ID,
|
|
469
545
|
label: "Modal",
|
|
470
546
|
iconAsset: MODAL_ICON_ASSET,
|
|
471
|
-
addonId: this.deps.addonId
|
|
547
|
+
addonId: this.deps.addonId,
|
|
548
|
+
configSchema: MODAL_ENTRY_CONFIG_SCHEMA
|
|
472
549
|
}];
|
|
473
550
|
listEntries = async () => this.deps.listEntries().map((entry) => ({
|
|
474
551
|
entryId: entry.id,
|
|
@@ -774,8 +851,11 @@ var ModalTrainingProvider = class {
|
|
|
774
851
|
return (entry.tokenId ?? "").trim() !== "" && secret.trim() !== "";
|
|
775
852
|
}
|
|
776
853
|
descriptorOf(entry, tokenSecretView) {
|
|
777
|
-
const
|
|
778
|
-
const
|
|
854
|
+
const gpuType = entry.gpuType ?? "L4";
|
|
855
|
+
const region = entry.region ?? "";
|
|
856
|
+
const costCapUsd = entry.costCapUsd ?? 5;
|
|
857
|
+
const maxRuntimeHours = entry.maxRuntimeHours ?? 4;
|
|
858
|
+
const failedDatasetGraceHours = entry.failedDatasetGraceHours ?? 24;
|
|
779
859
|
return {
|
|
780
860
|
addonId: this.deps.addonId,
|
|
781
861
|
entryId: entry.id,
|
|
@@ -792,16 +872,22 @@ var ModalTrainingProvider = class {
|
|
|
792
872
|
dataResidencyNote: "Modal keeps the frames on a Volume of your workspace for the length of the job; the training container sees them only while it runs.",
|
|
793
873
|
configured: this.entryConfigured(entry),
|
|
794
874
|
defaults: {
|
|
795
|
-
gpuType
|
|
796
|
-
region
|
|
797
|
-
costCapUsd
|
|
798
|
-
maxRuntimeSec: Math.round(
|
|
799
|
-
failedDatasetGraceHours
|
|
875
|
+
gpuType,
|
|
876
|
+
region,
|
|
877
|
+
costCapUsd,
|
|
878
|
+
maxRuntimeSec: Math.round(maxRuntimeHours * 3600),
|
|
879
|
+
failedDatasetGraceHours
|
|
800
880
|
},
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
881
|
+
formValues: {
|
|
882
|
+
tokenId: entry.tokenId ?? "",
|
|
883
|
+
tokenSecret: tokenSecretView ?? "",
|
|
884
|
+
environment: entry.environment ?? "",
|
|
885
|
+
gpuType,
|
|
886
|
+
region,
|
|
887
|
+
costCapUsd,
|
|
888
|
+
maxRuntimeHours,
|
|
889
|
+
failedDatasetGraceHours
|
|
890
|
+
}
|
|
805
891
|
};
|
|
806
892
|
}
|
|
807
893
|
requireGateway(entryId) {
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C_ftN9dQ.mjs";
|
|
2
2
|
export { t as get, e as init };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-
|
|
1
|
+
import { S as e, _ as t, c as n, l as r, m as i, n as a, r as o, t as s, u as c, v as l } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
|
|
2
|
+
import { h as u } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-OmGE1nuE.mjs";
|
|
3
|
+
import "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
|
|
4
4
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
5
|
-
|
|
5
|
+
e();
|
|
6
6
|
var d = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), f = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), p = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), m = (e) => {
|
|
7
7
|
let t = p(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
@@ -19,7 +19,7 @@ var d = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
19
19
|
}, g = (e) => {
|
|
20
20
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
21
21
|
return !1;
|
|
22
|
-
}, _ =
|
|
22
|
+
}, _ = o(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: o, iconNode: s, ...c }, l) => a("svg", {
|
|
23
23
|
ref: l,
|
|
24
24
|
...h,
|
|
25
25
|
width: t,
|
|
@@ -27,14 +27,14 @@ var d = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
27
27
|
stroke: e,
|
|
28
28
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
29
29
|
className: d("lucide", i),
|
|
30
|
-
...!
|
|
30
|
+
...!o && !g(c) && { "aria-hidden": "true" },
|
|
31
31
|
...c
|
|
32
|
-
}, [...s.map(([e, t]) =>
|
|
32
|
+
}, [...s.map(([e, t]) => a(e, t)), ...Array.isArray(o) ? o : [o]]));
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
35
|
-
|
|
35
|
+
e();
|
|
36
36
|
var v = (e, t) => {
|
|
37
|
-
let n =
|
|
37
|
+
let n = o(({ className: n, ...r }, i) => a(_, {
|
|
38
38
|
ref: i,
|
|
39
39
|
iconNode: t,
|
|
40
40
|
className: d(`lucide-${f(m(e))}`, `lucide-${e}`, n),
|
|
@@ -44,65 +44,69 @@ var v = (e, t) => {
|
|
|
44
44
|
};
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region ../ui-library/src/lib/shared-context.ts
|
|
47
|
-
|
|
47
|
+
e();
|
|
48
48
|
function y(e, t) {
|
|
49
|
-
if (typeof globalThis > "u") return
|
|
49
|
+
if (typeof globalThis > "u") return s(t);
|
|
50
50
|
let n = globalThis.__camstackSharedContexts, r = n ?? /* @__PURE__ */ new Map();
|
|
51
51
|
n || (globalThis.__camstackSharedContexts = r);
|
|
52
52
|
let i = r.get(e);
|
|
53
53
|
if (i) return i;
|
|
54
|
-
let a =
|
|
54
|
+
let a = s(t);
|
|
55
55
|
return r.set(e, a), a;
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region ../ui-library/src/contexts/system-context.tsx
|
|
59
|
-
|
|
59
|
+
e();
|
|
60
60
|
var b = y("camstack:system", null);
|
|
61
61
|
function x() {
|
|
62
|
-
let e =
|
|
62
|
+
let e = r(b);
|
|
63
63
|
if (!e) throw Error("useSystem(): no <SystemProvider> in tree");
|
|
64
64
|
return e;
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region ../ui-library/src/hooks/use-device-proxy.ts
|
|
68
|
-
|
|
68
|
+
e();
|
|
69
69
|
var S = "capability.binding-changed";
|
|
70
|
-
function C(e,
|
|
71
|
-
let [
|
|
72
|
-
return
|
|
73
|
-
if (
|
|
74
|
-
|
|
70
|
+
function C(e, n) {
|
|
71
|
+
let [r, a] = t(null);
|
|
72
|
+
return c(() => {
|
|
73
|
+
if (n === null) {
|
|
74
|
+
a(null);
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
let
|
|
77
|
+
let t = !1, r = async () => {
|
|
78
78
|
try {
|
|
79
|
-
let r = await e.deviceManager.getBindings.query({ deviceId:
|
|
80
|
-
|
|
79
|
+
let r = await e.deviceManager.getBindings.query({ deviceId: n });
|
|
80
|
+
t || a(r);
|
|
81
81
|
} catch {
|
|
82
|
-
|
|
82
|
+
t || a((e) => e);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
r();
|
|
86
|
-
let
|
|
87
|
-
let
|
|
88
|
-
if (!
|
|
86
|
+
let i = e.live?.onEvent.subscribe({ category: S }, { onData: (e) => {
|
|
87
|
+
let t = e.data?.source;
|
|
88
|
+
if (!t) {
|
|
89
89
|
r();
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
t.type === "device" && t.id === n && r();
|
|
93
93
|
} });
|
|
94
94
|
return () => {
|
|
95
|
-
|
|
95
|
+
t = !0, i?.unsubscribe();
|
|
96
96
|
};
|
|
97
|
-
}, [e,
|
|
97
|
+
}, [e, n]), i(() => r ? u(e, r) : null, [e, r]);
|
|
98
98
|
}
|
|
99
|
-
function w(
|
|
100
|
-
let
|
|
101
|
-
return
|
|
99
|
+
function w(e) {
|
|
100
|
+
let t = n((t) => e ? e.subscribe(() => t()) : () => void 0, [e]), r = n(() => e?.value, [e]);
|
|
101
|
+
return l(t, r, r);
|
|
102
|
+
}
|
|
103
|
+
function T(e, t, n) {
|
|
104
|
+
let r = C(e, t);
|
|
105
|
+
return w(r ? n(r.state) : void 0);
|
|
102
106
|
}
|
|
103
107
|
//#endregion
|
|
104
108
|
//#region ../ui-library/src/lib/cap-error.ts
|
|
105
|
-
function
|
|
109
|
+
function E(e) {
|
|
106
110
|
if (typeof e != "object" || !e) return null;
|
|
107
111
|
let t = Reflect.get(e, "data");
|
|
108
112
|
if (typeof t == "object" && t) {
|
|
@@ -111,12 +115,12 @@ function T(e) {
|
|
|
111
115
|
}
|
|
112
116
|
return null;
|
|
113
117
|
}
|
|
114
|
-
function
|
|
115
|
-
let t =
|
|
118
|
+
function D(e) {
|
|
119
|
+
let t = E(e);
|
|
116
120
|
return t === null ? (e instanceof Error ? e.message : String(e)).includes("provider not available") : t === "no-provider" || t === "node-offline";
|
|
117
121
|
}
|
|
118
122
|
//#endregion
|
|
119
123
|
//#region ../ui-library/src/lib/responsive.ts
|
|
120
|
-
var
|
|
124
|
+
var O = "rounded-lg border border-border bg-surface overflow-hidden", k = "border-b border-border px-3 sm:px-4 py-1.5 sm:py-2", A = "p-2 sm:p-3 lg:p-4", j = "grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4", M = "flex min-w-0 flex-col gap-0.5 py-1.5 sm:flex-row sm:items-center", N = "min-w-0 text-[11px] leading-tight text-foreground-subtle sm:w-32 sm:shrink-0 sm:pr-2", P = "flex w-full min-w-0 items-center gap-1 sm:flex-1", F = "min-w-0 break-all text-xs text-foreground sm:truncate", I = "text-[10px] sm:text-[11px] font-semibold text-foreground uppercase tracking-wider", L = "text-[10px] text-foreground-subtle", R = "inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium transition-colors", z = "border-primary/50 bg-primary/15 text-primary", B = "border-border bg-surface text-foreground-subtle hover:bg-surface-hover";
|
|
121
125
|
//#endregion
|
|
122
|
-
export {
|
|
126
|
+
export { w as _, A as a, v as b, M as c, F as d, L as f, T as g, C as h, j as i, N as l, D as m, R as n, O as o, I as p, B as r, k as s, z as t, P as u, x as v, y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { S as e, _ as t, c as n, m as r } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
|
|
2
|
+
import { b as i } from "./responsive-vGH-n9E5.mjs";
|
|
3
3
|
var a = i("camera", [["path", {
|
|
4
4
|
d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
|
|
5
5
|
key: "18u6gg"
|
|
@@ -89,7 +89,7 @@ function g(e) {
|
|
|
89
89
|
//#region ../ui-library/src/hooks/use-device-snapshot.ts
|
|
90
90
|
var _ = "/addon/snapshot/media";
|
|
91
91
|
function v(e, i = {}) {
|
|
92
|
-
let { width: a, baseUrl: o } = i, [s, c] =
|
|
92
|
+
let { width: a, baseUrl: o } = i, [s, c] = t(0);
|
|
93
93
|
return {
|
|
94
94
|
src: r(() => {
|
|
95
95
|
if (e === null || e <= 0) return null;
|
|
@@ -104,7 +104,7 @@ function v(e, i = {}) {
|
|
|
104
104
|
s
|
|
105
105
|
]),
|
|
106
106
|
loading: !1,
|
|
107
|
-
refresh:
|
|
107
|
+
refresh: n(() => {
|
|
108
108
|
c((e) => e + 1);
|
|
109
109
|
}, [])
|
|
110
110
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as e } from "./responsive-vGH-n9E5.mjs";
|
|
2
2
|
var t = e("eye-off", [
|
|
3
3
|
["path", {
|
|
4
4
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
@@ -16,7 +16,32 @@ var t = e("eye-off", [
|
|
|
16
16
|
d: "m2 2 20 20",
|
|
17
17
|
key: "1ooewy"
|
|
18
18
|
}]
|
|
19
|
-
]), n = e("mic", [
|
|
19
|
+
]), n = e("mic-off", [
|
|
20
|
+
["path", {
|
|
21
|
+
d: "M12 19v3",
|
|
22
|
+
key: "npa21l"
|
|
23
|
+
}],
|
|
24
|
+
["path", {
|
|
25
|
+
d: "M15 9.34V5a3 3 0 0 0-5.68-1.33",
|
|
26
|
+
key: "1gzdoj"
|
|
27
|
+
}],
|
|
28
|
+
["path", {
|
|
29
|
+
d: "M16.95 16.95A7 7 0 0 1 5 12v-2",
|
|
30
|
+
key: "cqa7eg"
|
|
31
|
+
}],
|
|
32
|
+
["path", {
|
|
33
|
+
d: "M18.89 13.23A7 7 0 0 0 19 12v-2",
|
|
34
|
+
key: "16hl24"
|
|
35
|
+
}],
|
|
36
|
+
["path", {
|
|
37
|
+
d: "m2 2 20 20",
|
|
38
|
+
key: "1ooewy"
|
|
39
|
+
}],
|
|
40
|
+
["path", {
|
|
41
|
+
d: "M9 9v3a3 3 0 0 0 5.12 2.12",
|
|
42
|
+
key: "r2i35w"
|
|
43
|
+
}]
|
|
44
|
+
]), r = e("mic", [
|
|
20
45
|
["path", {
|
|
21
46
|
d: "M12 19v3",
|
|
22
47
|
key: "npa21l"
|
|
@@ -33,7 +58,7 @@ var t = e("eye-off", [
|
|
|
33
58
|
rx: "3",
|
|
34
59
|
key: "s6n7sd"
|
|
35
60
|
}]
|
|
36
|
-
]),
|
|
61
|
+
]), i = e("square", [["rect", {
|
|
37
62
|
width: "18",
|
|
38
63
|
height: "18",
|
|
39
64
|
x: "3",
|
|
@@ -42,4 +67,4 @@ var t = e("eye-off", [
|
|
|
42
67
|
key: "afitv7"
|
|
43
68
|
}]]);
|
|
44
69
|
//#endregion
|
|
45
|
-
export { n,
|
|
70
|
+
export { t as i, r as n, n as r, i as t };
|