@milabench/bujang 0.1.12 → 0.1.14

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/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SlurmJob, SlurmJobSubmitResponse, SlurmJobAccounting, SlurmJobDetail, SlurmClusterInfo, SlurmProfile, SlurmClusterStatus, PersitedJobInfo, SlurmJobStatusResponse, EarlySyncResponse, PipelineTemplatePayload, PipelineRunResponse, PipelineRunSummary, PipelineRunStatus, ScheduledJob, ScheduledJobRun, ScheduledJobTemplateDiff, AgentEvent, AgentSession, SettingsInfo, SettingsUpdateResponse, UpdateCheck, OrganizerGroups, SyncStatus, JobArtifacts, JobData, JobMarks, UpdateResult, SettingsSecrets, SshSettings, SshPlan, SshPlanRequest, SshTestResponse, SshConnections, SshLogin, JobAttachment, JanitorOverview, JanitorRun, JanitorCleanupInfo, JanitorArchiveResult, JanitorStaleResult } from './types';
1
+ import type { SlurmJob, SlurmJobSubmitResponse, SlurmJobAccounting, SlurmJobDetail, SlurmClusterInfo, SlurmProfile, SlurmClusterStatus, PersitedJobInfo, SlurmJobStatusResponse, EarlySyncResponse, PipelineTemplatePayload, PipelineRunResponse, PipelineRunSummary, PipelineRunStatus, ScheduledJob, ScheduledJobRun, ScheduledJobTemplateDiff, AgentEvent, AgentSession, SettingsInfo, SettingsUpdateResponse, UpdateCheck, OrganizerGroups, SyncStatus, JobEnvironment, JobArtifacts, JobData, JobDataRole, JobOverviewLayout, OverviewLayout, OverviewScope, SavedOverviewLayout, JobMarks, UpdateResult, SettingsSecrets, SshSettings, SshPlan, SshPlanRequest, SshTestResponse, SshConnections, SshLogin, JobAttachment, JanitorOverview, JanitorRun, JanitorCleanupInfo, JanitorArchiveResult, JanitorStaleResult } from './types';
2
2
  export declare const DEFAULT_API_BASE = "/api/slurm";
3
3
  /**
4
4
  * What bujang needs from an axios instance. Typed structurally so the host's instance fits even
@@ -66,6 +66,8 @@ export interface SlurmCluster {
66
66
  login?: string;
67
67
  proxy?: boolean;
68
68
  }
69
+ /** The variables bujang sets in a job of `cluster`, resolved for a job named `name` (label or job name). */
70
+ export declare const getJobEnvironment: (cluster: string, name?: string) => Promise<JobEnvironment>;
69
71
  export declare const getSlurmClusters: () => Promise<SlurmCluster[]>;
70
72
  export declare const saveSlurmProfile: (request: {
71
73
  name: string;
@@ -80,7 +82,7 @@ export declare const saveSlurmProfile: (request: {
80
82
  export declare const submitSlurmJob: (request: {
81
83
  script: string;
82
84
  job_name?: string;
83
- /** label template ("train lr={LR}"), else the script's JR_JOB_LABEL */
85
+ /** label template ("train lr={LR}"), else the script's BUJANG_JOB_LABEL */
84
86
  label?: string;
85
87
  cluster?: string;
86
88
  sbatch_args?: string[];
@@ -97,7 +99,7 @@ export declare const submitSlurmJob: (request: {
97
99
  export?: string;
98
100
  nodelist?: string;
99
101
  dependency?: [string, string][];
100
- /** Files for the job: <job folder>/input/<name> on the cluster before it starts ($JR_INPUT_DIR). */
102
+ /** Files for the job: <job folder>/input/<name> on the cluster before it starts ($BUJANG_INPUT_DIR). */
101
103
  files?: JobAttachment[];
102
104
  }) => Promise<SlurmJobSubmitResponse>;
103
105
  export declare const getSlurmJobCluster: (jrJobId: string) => Promise<{
@@ -141,18 +143,34 @@ export declare const deleteSlurmSecret: (name: string) => Promise<{
141
143
  message?: string;
142
144
  }>;
143
145
  export declare const getSettings: () => Promise<SettingsInfo>;
144
- /** Write local_cache / workdir / database_url (null: remove it) to the user file. */
145
- export declare const updateSettings: (values: Partial<Record<"local_cache" | "workdir" | "database_url", string | null>>) => Promise<SettingsUpdateResponse>;
146
+ /** Write local_cache / workdir / database_url / show_examples (null: remove it) to the user file. */
147
+ export declare const updateSettings: (values: Partial<Record<"local_cache" | "workdir" | "database_url" | "mcp_instructions", string | null> & {
148
+ show_examples: boolean;
149
+ overview_layout: OverviewLayout | null;
150
+ }>) => Promise<SettingsUpdateResponse>;
146
151
  /** The files of results/ and output/ of a job folder (reports first). */
147
152
  export declare const getJobArtifacts: (jrJobId: string) => Promise<JobArtifacts>;
148
153
  /** URL of an artifact, to open in a tab: its relative links (images, scripts) resolve next to it. */
149
154
  export declare const jobArtifactUrl: (jrJobId: string, path: string) => string;
155
+ /** The layout of a job's Overview tab and where it comes from. */
156
+ export declare const getJobOverviewLayout: (jrJobId: string) => Promise<JobOverviewLayout>;
157
+ /** The Overview layouts saved for an experiment or a script. */
158
+ export declare const getOverviewLayouts: () => Promise<SavedOverviewLayout[]>;
159
+ /** Save the Overview layout of an experiment or a script; null removes it. */
160
+ export declare const saveOverviewLayout: (scope: OverviewScope, key: string, layout: OverviewLayout | null) => Promise<{
161
+ success: boolean;
162
+ scope: OverviewScope;
163
+ key: string;
164
+ removed: boolean;
165
+ }>;
150
166
  /** The JSONL files of the artifact folders of a job, with their events and fields (cached server side). */
151
167
  export declare const getJobData: (jrJobId: string) => Promise<JobData>;
152
168
  /** Query of GET /jobs/<jr>/data/rows: comma separated files (or globs), events, dotted fields. */
153
169
  export interface JobDataRowsQuery {
154
170
  files?: string[];
155
171
  events?: string[];
172
+ /** only the rows of these roles ('log': the log view) */
173
+ roles?: JobDataRole[];
156
174
  fields?: string[];
157
175
  /** only the rows having these fields */
158
176
  require?: string[];
@@ -1,3 +1,9 @@
1
1
  export declare const NO_JOB_ID = "-";
2
2
  export declare const NO_JOB_STATE = "-";
3
3
  export declare const NO_JR_JOB_ID = "-";
4
+ /** `css` of a dense table: less vertical padding in the body cells than Chakra's `sm` (8px) */
5
+ export declare const COMPACT_ROWS: {
6
+ readonly '& tbody td': {
7
+ readonly paddingBlock: "4px";
8
+ };
9
+ };