@platforma-open/milaboratories.gpu-test.model 0.1.0
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/.turbo/turbo-build.log +16 -0
- package/.turbo/turbo-lint.log +5 -0
- package/.turbo/turbo-type-check.log +6 -0
- package/dist/bundle.js +8147 -0
- package/dist/bundle.js.map +1 -0
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/model.json +1 -0
- package/eslint.config.mjs +4 -0
- package/package.json +37 -0
- package/src/index.ts +63 -0
- package/tsconfig.json +9 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var model$1 = require('@platforma-sdk/model');
|
|
4
|
+
|
|
5
|
+
const model = model$1.BlockModel.create()
|
|
6
|
+
.withArgs({})
|
|
7
|
+
.withUiState({})
|
|
8
|
+
.argsValid(() => true)
|
|
9
|
+
.output('gpuLog', (ctx) => ctx.outputs?.resolve('gpuLog')?.getLogHandle())
|
|
10
|
+
.output('gpuInfo', (ctx) => ctx.outputs?.resolve('gpuInfo')?.getDataAsJson())
|
|
11
|
+
.output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
|
|
12
|
+
.title(() => 'GPU Test')
|
|
13
|
+
.sections(() => [{ type: 'link', href: '/', label: 'GPU Info' }])
|
|
14
|
+
.done(1);
|
|
15
|
+
|
|
16
|
+
exports.model = model;
|
|
17
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { BlockModel } from '@platforma-sdk/model';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- GPU config will be added in Step 8\nexport type BlockArgs = {};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- UI state will be added in Step 8\nexport type UiState = {};\n\nexport const model = BlockModel.create()\n .withArgs<BlockArgs>({})\n .withUiState<UiState>({})\n .argsValid(() => true)\n\n .output('gpuLog', (ctx) => ctx.outputs?.resolve('gpuLog')?.getLogHandle())\n .output('gpuInfo', (ctx) => ctx.outputs?.resolve('gpuInfo')?.getDataAsJson<GpuReport>())\n .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n\n .title(() => 'GPU Test')\n .sections(() => [{ type: 'link' as const, href: '/' as const, label: 'GPU Info' }])\n .done(1);\n\nexport interface GpuReport {\n gpu_available: boolean;\n torch_cuda: {\n available: boolean;\n device_count: number;\n cuda_version: string | null;\n cudnn_version: string | null;\n devices: Array<{\n index: number;\n name: string;\n total_memory_mb: number;\n free_memory_mb?: number;\n major: number;\n minor: number;\n multi_processor_count: number;\n }>;\n error?: string;\n };\n nvidia_smi: {\n available: boolean;\n driver_version: string | null;\n devices: Array<{\n index: number;\n name: string;\n memory_total_mb: number;\n memory_free_mb: number;\n memory_used_mb: number;\n temperature_c: number | null;\n }>;\n error?: string;\n };\n environment: Record<string, string>;\n benchmark: {\n ran: boolean;\n matrix_size?: number;\n cpu_time_ms?: number;\n gpu_time_ms?: number;\n speedup?: number;\n skipped?: string;\n error?: string;\n };\n}\n"],"names":["BlockModel"],"mappings":";;;;AAQO,MAAM,KAAK,GAAGA,kBAAU,CAAC,MAAM;KACnC,QAAQ,CAAY,EAAE;KACtB,WAAW,CAAU,EAAE;AACvB,KAAA,SAAS,CAAC,MAAM,IAAI;AAEpB,KAAA,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE;AACxE,KAAA,MAAM,CAAC,SAAS,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,aAAa,EAAa;AACtF,KAAA,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,KAAK;AAEvE,KAAA,KAAK,CAAC,MAAM,UAAU;AACtB,KAAA,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,GAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;KACjF,IAAI,CAAC,CAAC;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export type BlockArgs = {};
|
|
2
|
+
export type UiState = {};
|
|
3
|
+
export declare const model: import("@platforma-sdk/model").PlatformaExtended<import("@platforma-sdk/model").PlatformaV1<BlockArgs, import("@platforma-sdk/model").InferOutputsFromConfigs<BlockArgs, {
|
|
4
|
+
gpuLog: import("@platforma-sdk/model").ConfigRenderLambda<import("@platforma-sdk/model").AnyLogHandle | undefined>;
|
|
5
|
+
} & {
|
|
6
|
+
gpuInfo: import("@platforma-sdk/model").ConfigRenderLambda<{
|
|
7
|
+
gpu_available: boolean;
|
|
8
|
+
torch_cuda: {
|
|
9
|
+
available: boolean;
|
|
10
|
+
device_count: number;
|
|
11
|
+
cuda_version: string | null;
|
|
12
|
+
cudnn_version: string | null;
|
|
13
|
+
devices: {
|
|
14
|
+
index: number;
|
|
15
|
+
name: string;
|
|
16
|
+
total_memory_mb: number;
|
|
17
|
+
free_memory_mb?: number | undefined;
|
|
18
|
+
major: number;
|
|
19
|
+
minor: number;
|
|
20
|
+
multi_processor_count: number;
|
|
21
|
+
}[];
|
|
22
|
+
error?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
nvidia_smi: {
|
|
25
|
+
available: boolean;
|
|
26
|
+
driver_version: string | null;
|
|
27
|
+
devices: {
|
|
28
|
+
index: number;
|
|
29
|
+
name: string;
|
|
30
|
+
memory_total_mb: number;
|
|
31
|
+
memory_free_mb: number;
|
|
32
|
+
memory_used_mb: number;
|
|
33
|
+
temperature_c: number | null;
|
|
34
|
+
}[];
|
|
35
|
+
error?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
environment: {
|
|
38
|
+
[x: string]: string;
|
|
39
|
+
};
|
|
40
|
+
benchmark: {
|
|
41
|
+
ran: boolean;
|
|
42
|
+
matrix_size?: number | undefined;
|
|
43
|
+
cpu_time_ms?: number | undefined;
|
|
44
|
+
gpu_time_ms?: number | undefined;
|
|
45
|
+
speedup?: number | undefined;
|
|
46
|
+
skipped?: string | undefined;
|
|
47
|
+
error?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
} | undefined>;
|
|
50
|
+
} & {
|
|
51
|
+
isRunning: import("@platforma-sdk/model").ConfigRenderLambda<boolean>;
|
|
52
|
+
}, UiState>, UiState, "/">>;
|
|
53
|
+
export interface GpuReport {
|
|
54
|
+
gpu_available: boolean;
|
|
55
|
+
torch_cuda: {
|
|
56
|
+
available: boolean;
|
|
57
|
+
device_count: number;
|
|
58
|
+
cuda_version: string | null;
|
|
59
|
+
cudnn_version: string | null;
|
|
60
|
+
devices: Array<{
|
|
61
|
+
index: number;
|
|
62
|
+
name: string;
|
|
63
|
+
total_memory_mb: number;
|
|
64
|
+
free_memory_mb?: number;
|
|
65
|
+
major: number;
|
|
66
|
+
minor: number;
|
|
67
|
+
multi_processor_count: number;
|
|
68
|
+
}>;
|
|
69
|
+
error?: string;
|
|
70
|
+
};
|
|
71
|
+
nvidia_smi: {
|
|
72
|
+
available: boolean;
|
|
73
|
+
driver_version: string | null;
|
|
74
|
+
devices: Array<{
|
|
75
|
+
index: number;
|
|
76
|
+
name: string;
|
|
77
|
+
memory_total_mb: number;
|
|
78
|
+
memory_free_mb: number;
|
|
79
|
+
memory_used_mb: number;
|
|
80
|
+
temperature_c: number | null;
|
|
81
|
+
}>;
|
|
82
|
+
error?: string;
|
|
83
|
+
};
|
|
84
|
+
environment: Record<string, string>;
|
|
85
|
+
benchmark: {
|
|
86
|
+
ran: boolean;
|
|
87
|
+
matrix_size?: number;
|
|
88
|
+
cpu_time_ms?: number;
|
|
89
|
+
gpu_time_ms?: number;
|
|
90
|
+
speedup?: number;
|
|
91
|
+
skipped?: string;
|
|
92
|
+
error?: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GAAG,EAAE,CAAC;AAG3B,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AAEzB,eAAO,MAAM,KAAK;;;;uBAcD,OAAO;;uBAET,OAAO;0BACJ,MAAM;0BACN,MAAM,GAAG,IAAI;2BACZ,MAAM,GAAG,IAAI;;uBAEnB,MAAM;sBACP,MAAM;iCACK,MAAM;iCACN,MAAM;uBAChB,MAAM;uBACN,MAAM;uCACU,MAAM;;oBAEvB,MAAM;;;uBAGH,OAAO;4BACF,MAAM,GAAG,IAAI;;uBAEpB,MAAM;sBACP,MAAM;iCACK,MAAM;gCACP,MAAM;gCACN,MAAM;+BACP,MAAM,GAAG,IAAI;;oBAEtB,MAAM;;;;;;iBAIT,OAAO;0BACE,MAAM;0BACN,MAAM;0BACN,MAAM;sBACV,MAAM;sBACN,MAAM;oBACR,MAAM;;;;;2BAzCR,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE;QACV,SAAS,EAAE,OAAO,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,OAAO,EAAE,KAAK,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,MAAM,CAAC;YACb,eAAe,EAAE,MAAM,CAAC;YACxB,cAAc,CAAC,EAAE,MAAM,CAAC;YACxB,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;YACd,qBAAqB,EAAE,MAAM,CAAC;SAC/B,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,EAAE;QACV,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,OAAO,EAAE,KAAK,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,MAAM,CAAC;YACb,eAAe,EAAE,MAAM,CAAC;YACxB,cAAc,EAAE,MAAM,CAAC;YACvB,cAAc,EAAE,MAAM,CAAC;YACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;SAC9B,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,SAAS,EAAE;QACT,GAAG,EAAE,OAAO,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BlockModel } from '@platforma-sdk/model';
|
|
2
|
+
|
|
3
|
+
const model = BlockModel.create()
|
|
4
|
+
.withArgs({})
|
|
5
|
+
.withUiState({})
|
|
6
|
+
.argsValid(() => true)
|
|
7
|
+
.output('gpuLog', (ctx) => ctx.outputs?.resolve('gpuLog')?.getLogHandle())
|
|
8
|
+
.output('gpuInfo', (ctx) => ctx.outputs?.resolve('gpuInfo')?.getDataAsJson())
|
|
9
|
+
.output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
|
|
10
|
+
.title(() => 'GPU Test')
|
|
11
|
+
.sections(() => [{ type: 'link', href: '/', label: 'GPU Info' }])
|
|
12
|
+
.done(1);
|
|
13
|
+
|
|
14
|
+
export { model };
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { BlockModel } from '@platforma-sdk/model';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- GPU config will be added in Step 8\nexport type BlockArgs = {};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- UI state will be added in Step 8\nexport type UiState = {};\n\nexport const model = BlockModel.create()\n .withArgs<BlockArgs>({})\n .withUiState<UiState>({})\n .argsValid(() => true)\n\n .output('gpuLog', (ctx) => ctx.outputs?.resolve('gpuLog')?.getLogHandle())\n .output('gpuInfo', (ctx) => ctx.outputs?.resolve('gpuInfo')?.getDataAsJson<GpuReport>())\n .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n\n .title(() => 'GPU Test')\n .sections(() => [{ type: 'link' as const, href: '/' as const, label: 'GPU Info' }])\n .done(1);\n\nexport interface GpuReport {\n gpu_available: boolean;\n torch_cuda: {\n available: boolean;\n device_count: number;\n cuda_version: string | null;\n cudnn_version: string | null;\n devices: Array<{\n index: number;\n name: string;\n total_memory_mb: number;\n free_memory_mb?: number;\n major: number;\n minor: number;\n multi_processor_count: number;\n }>;\n error?: string;\n };\n nvidia_smi: {\n available: boolean;\n driver_version: string | null;\n devices: Array<{\n index: number;\n name: string;\n memory_total_mb: number;\n memory_free_mb: number;\n memory_used_mb: number;\n temperature_c: number | null;\n }>;\n error?: string;\n };\n environment: Record<string, string>;\n benchmark: {\n ran: boolean;\n matrix_size?: number;\n cpu_time_ms?: number;\n gpu_time_ms?: number;\n speedup?: number;\n skipped?: string;\n error?: string;\n };\n}\n"],"names":[],"mappings":";;AAQO,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM;KACnC,QAAQ,CAAY,EAAE;KACtB,WAAW,CAAU,EAAE;AACvB,KAAA,SAAS,CAAC,MAAM,IAAI;AAEpB,KAAA,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE;AACxE,KAAA,MAAM,CAAC,SAAS,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,aAAa,EAAa;AACtF,KAAA,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,KAAK;AAEvE,KAAA,KAAK,CAAC,MAAM,UAAU;AACtB,KAAA,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,GAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;KACjF,IAAI,CAAC,CAAC;;;;"}
|