chore: add worker notes

This commit is contained in:
jialin
2025-11-04 17:19:20 +08:00
parent 23b7936924
commit e5733a7f6e
15 changed files with 318 additions and 137 deletions
+7 -2
View File
@@ -64,8 +64,13 @@ const AdvanceConfig = () => {
options={modelCategories}
></SealSelect>
</Form.Item>
{formKey === DeployFormKeyMap.CATALOG && <BackendForm></BackendForm>}
<CustomBackend></CustomBackend>
{formKey === DeployFormKeyMap.CATALOG && (
<>
<BackendForm></BackendForm>
<CustomBackend></CustomBackend>
</>
)}
<BackendParametersList></BackendParametersList>
<Form.Item<FormData> name="env">
<LabelSelector
+8 -1
View File
@@ -12,6 +12,7 @@ import { DeployFormKeyMap, sourceOptions } from '../config';
import { useFormContext } from '../config/form-context';
import { FormData } from '../config/types';
import BackendForm from './backend';
import CustomBackend from './custom-backend';
import LocalPathSource from './local-path-source';
import OnlineSource from './online-source';
@@ -118,7 +119,13 @@ const BasicForm: React.FC<BasicFormProps> = (props) => {
></SealSelect>
}
</Form.Item>
{formKey === DeployFormKeyMap.DEPLOYMENT && <BackendForm></BackendForm>}
{formKey === DeployFormKeyMap.DEPLOYMENT && (
<>
<BackendForm></BackendForm>
<CustomBackend></CustomBackend>
</>
)}
<Form.Item<FormData>
name="replicas"
rules={[
+5 -4
View File
@@ -71,12 +71,13 @@ const ScheduleTypeForm: React.FC = () => {
const scheduleType = Form.useWatch('scheduleType', form);
const workerSelector = Form.useWatch('worker_selector', form);
const handleScheduleTypeChange = (value: string) => {
const handleScheduleTypeChange = async (value: string) => {
if (value === ScheduleValueMap.Auto) {
await new Promise((resolve) => {
setTimeout(resolve, 100);
});
onValuesChange?.({}, form.getFieldsValue());
return;
}
if (value === ScheduleValueMap.Manual) {
} else if (value === ScheduleValueMap.Manual) {
form.setFieldValue(['gpu_selector', 'gpus_per_replica'], null);
}
};