On a new training job, or when editing one, load everything before allowing editing
This commit is contained in:
@@ -30,6 +30,7 @@ type Props = {
|
|||||||
setGpuIDs: (value: string | null) => void;
|
setGpuIDs: (value: string | null) => void;
|
||||||
gpuList: any;
|
gpuList: any;
|
||||||
datasetOptions: any;
|
datasetOptions: any;
|
||||||
|
isLoading?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const isDev = process.env.NODE_ENV === 'development';
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
@@ -44,6 +45,7 @@ export default function SimpleJob({
|
|||||||
setGpuIDs,
|
setGpuIDs,
|
||||||
gpuList,
|
gpuList,
|
||||||
datasetOptions,
|
datasetOptions,
|
||||||
|
isLoading,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const modelArch = useMemo(() => {
|
const modelArch = useMemo(() => {
|
||||||
return modelArchs.find(a => a.name === jobConfig.config.process[0].model.arch) as ModelArch;
|
return modelArchs.find(a => a.name === jobConfig.config.process[0].model.arch) as ModelArch;
|
||||||
@@ -146,7 +148,15 @@ export default function SimpleJob({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<form onSubmit={handleSubmit} className="space-y-8">
|
<form onSubmit={handleSubmit} className={`space-y-8 relative ${isLoading ? 'pointer-events-none opacity-50' : ''}`}>
|
||||||
|
{isLoading && (
|
||||||
|
<div className="absolute inset-0 z-50 flex items-center justify-center">
|
||||||
|
<div className="flex flex-col items-center gap-3">
|
||||||
|
<div className="h-8 w-8 animate-spin rounded-full border-4 border-gray-400 border-t-blue-500" />
|
||||||
|
<span className="text-sm text-gray-400">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className={topBarClass}>
|
<div className={topBarClass}>
|
||||||
<Card title="Job">
|
<Card title="Job">
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ export default function TrainingForm() {
|
|||||||
setGpuIDs={setGpuIDs}
|
setGpuIDs={setGpuIDs}
|
||||||
gpuList={gpuList}
|
gpuList={gpuList}
|
||||||
datasetOptions={datasetOptions}
|
datasetOptions={datasetOptions}
|
||||||
|
isLoading={!isSettingsLoaded || !isGPUInfoLoaded || datasetFetchStatus !== 'success'}
|
||||||
/>
|
/>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user