@milabench/bujang 0.1.7 → 0.1.8
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/README.md +1 -1
- package/dist/api.d.ts +29 -1
- package/dist/components/LinkableCard.d.ts +27 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3813 -3006
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +8 -3
- package/dist/routes.d.ts +1 -1
- package/dist/types.d.ts +150 -0
- package/dist/views/JanitorView.d.ts +5 -0
- package/package.json +1 -1
- package/src/api.ts +70 -0
- package/src/components/LinkableCard.tsx +120 -0
- package/src/index.ts +2 -0
- package/src/paths.ts +13 -4
- package/src/routes.tsx +3 -1
- package/src/types.ts +158 -0
- package/src/views/JanitorView.tsx +690 -0
- package/src/views/JobLogs.tsx +2 -1
- package/src/views/JobSubmit.tsx +132 -11
- package/src/views/PipelineGraph.tsx +33 -3
- package/src/views/SettingsView.tsx +112 -48
package/src/types.ts
CHANGED
|
@@ -139,6 +139,14 @@ export interface SlurmJobSubmitRequest {
|
|
|
139
139
|
dependency?: [string, string][]
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
/** A file attached to a submission: lands in <job folder>/input/<name> ($JR_INPUT_DIR). */
|
|
143
|
+
export interface JobAttachment {
|
|
144
|
+
/** Relative path, sub folders allowed (data/train.csv). */
|
|
145
|
+
name: string;
|
|
146
|
+
/** base64 */
|
|
147
|
+
content: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
142
150
|
export interface SlurmJobSubmitResponse {
|
|
143
151
|
success: boolean;
|
|
144
152
|
job_id?: string;
|
|
@@ -477,6 +485,8 @@ export interface PushFolderResponse {
|
|
|
477
485
|
|
|
478
486
|
export interface EarlySyncResponse {
|
|
479
487
|
status: "ok" | "notok";
|
|
488
|
+
/** Why the rsync from the compute node failed (its stderr), when it ran */
|
|
489
|
+
error?: string | null;
|
|
480
490
|
}
|
|
481
491
|
|
|
482
492
|
|
|
@@ -610,6 +620,20 @@ export interface SettingsDatabaseTable {
|
|
|
610
620
|
name: string;
|
|
611
621
|
exists: boolean;
|
|
612
622
|
rows: number | null;
|
|
623
|
+
/** What the table holds (known tables only). */
|
|
624
|
+
description?: string | null;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/** A SQLite file of the local cache (state.db, fakeslurm.db). */
|
|
628
|
+
export interface SettingsLocalDatabase {
|
|
629
|
+
name: string;
|
|
630
|
+
path: string;
|
|
631
|
+
description: string;
|
|
632
|
+
exists: boolean;
|
|
633
|
+
/** Bytes, with the -wal / -shm files. */
|
|
634
|
+
size: number | null;
|
|
635
|
+
tables: SettingsDatabaseTable[];
|
|
636
|
+
error: string | null;
|
|
613
637
|
}
|
|
614
638
|
|
|
615
639
|
export interface SettingsDatabase {
|
|
@@ -625,6 +649,8 @@ export interface SettingsDatabase {
|
|
|
625
649
|
enabled: boolean;
|
|
626
650
|
tables: SettingsDatabaseTable[];
|
|
627
651
|
error: string | null;
|
|
652
|
+
/** The SQLite files of the local cache, whatever the database above is. */
|
|
653
|
+
local?: SettingsLocalDatabase[];
|
|
628
654
|
}
|
|
629
655
|
|
|
630
656
|
export interface SettingsMcp {
|
|
@@ -847,3 +873,135 @@ export interface SyncStatus {
|
|
|
847
873
|
synced?: Record<string, boolean>;
|
|
848
874
|
skipped?: string;
|
|
849
875
|
}
|
|
876
|
+
|
|
877
|
+
// ─── Janitor (/janitor routes) ─────────────────────────────────────
|
|
878
|
+
|
|
879
|
+
export type JanitorStatus = 'ok' | 'failed' | 'timeout' | 'skipped';
|
|
880
|
+
|
|
881
|
+
/** A background task running now. */
|
|
882
|
+
export interface JanitorTask {
|
|
883
|
+
id: string;
|
|
884
|
+
name: string;
|
|
885
|
+
/** rsync | scp | ssh | periodic | cleanup | request | task */
|
|
886
|
+
kind: string;
|
|
887
|
+
cluster: string | null;
|
|
888
|
+
started: number;
|
|
889
|
+
pid: number | null;
|
|
890
|
+
detail: Record<string, unknown>;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/** One finished task. */
|
|
894
|
+
export interface JanitorRun {
|
|
895
|
+
id: string;
|
|
896
|
+
name: string;
|
|
897
|
+
kind: string;
|
|
898
|
+
cluster: string | null;
|
|
899
|
+
/** rsync / scp: pull (cluster -> here) or push */
|
|
900
|
+
direction: 'pull' | 'push' | null;
|
|
901
|
+
started: number;
|
|
902
|
+
ended: number;
|
|
903
|
+
duration: number;
|
|
904
|
+
/** Seconds spent waiting for the cluster's sync queue. */
|
|
905
|
+
waited: number | null;
|
|
906
|
+
status: JanitorStatus;
|
|
907
|
+
error: string | null;
|
|
908
|
+
detail: Record<string, unknown>;
|
|
909
|
+
/** Bytes received / sent (rsync --stats, scp, ssh output); a sync or book keeping adds up its rsyncs. */
|
|
910
|
+
bytes_in: number | null;
|
|
911
|
+
bytes_out: number | null;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export interface JanitorStat {
|
|
915
|
+
name: string;
|
|
916
|
+
kind: string;
|
|
917
|
+
cluster: string | null;
|
|
918
|
+
runs: number;
|
|
919
|
+
failures: number;
|
|
920
|
+
total: number;
|
|
921
|
+
mean: number;
|
|
922
|
+
p95: number | null;
|
|
923
|
+
max: number;
|
|
924
|
+
waited: number;
|
|
925
|
+
last: number;
|
|
926
|
+
last_status: JanitorStatus | null;
|
|
927
|
+
bytes_in: number | null;
|
|
928
|
+
bytes_out: number | null;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
export interface JanitorQueueTicket {
|
|
932
|
+
id: string;
|
|
933
|
+
cluster: string;
|
|
934
|
+
what: string | null;
|
|
935
|
+
queued: number;
|
|
936
|
+
pid: number | null;
|
|
937
|
+
/** null: waiting its turn */
|
|
938
|
+
started: number | null;
|
|
939
|
+
expires: number;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
export interface JanitorPeriodic {
|
|
943
|
+
/** APScheduler job id, null when only its history is known */
|
|
944
|
+
id: string | null;
|
|
945
|
+
name: string;
|
|
946
|
+
interval: number | null;
|
|
947
|
+
next_run: number | null;
|
|
948
|
+
last: JanitorRun | null;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
export interface JanitorOverview {
|
|
952
|
+
now: number;
|
|
953
|
+
history_days: number;
|
|
954
|
+
active: JanitorTask[];
|
|
955
|
+
queue: JanitorQueueTicket[];
|
|
956
|
+
periodic: JanitorPeriodic[];
|
|
957
|
+
stats: { day: JanitorStat[]; week: JanitorStat[] };
|
|
958
|
+
/** Calls to each cluster over the last day (rsync, scp, ssh). */
|
|
959
|
+
clusters: Record<string, {
|
|
960
|
+
calls: number;
|
|
961
|
+
rsyncs: number;
|
|
962
|
+
seconds: number;
|
|
963
|
+
failures: number;
|
|
964
|
+
waited: number;
|
|
965
|
+
bytes_in: number;
|
|
966
|
+
bytes_out: number;
|
|
967
|
+
}>;
|
|
968
|
+
archive_roots: string[];
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
export interface JanitorCleanupInfo {
|
|
972
|
+
organizers: { name: string; values: { value: string; jobs: number }[] }[];
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
export interface JanitorSkipped {
|
|
976
|
+
jr_job_id: string;
|
|
977
|
+
value?: string;
|
|
978
|
+
reason: string;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
export interface JanitorArchiveItem {
|
|
982
|
+
jr_job_id: string;
|
|
983
|
+
value: string;
|
|
984
|
+
cluster: string | null;
|
|
985
|
+
from: string;
|
|
986
|
+
to: string;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export interface JanitorArchiveResult {
|
|
990
|
+
would_move?: JanitorArchiveItem[];
|
|
991
|
+
moved?: JanitorArchiveItem[];
|
|
992
|
+
skipped: JanitorSkipped[];
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export interface JanitorStaleItem {
|
|
996
|
+
jr_job_id: string;
|
|
997
|
+
cluster: string | null;
|
|
998
|
+
folder: string;
|
|
999
|
+
modified: number | null;
|
|
1000
|
+
state: string | string[] | null;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export interface JanitorStaleResult {
|
|
1004
|
+
would_remove?: JanitorStaleItem[];
|
|
1005
|
+
removed?: JanitorStaleItem[];
|
|
1006
|
+
skipped: JanitorSkipped[];
|
|
1007
|
+
}
|