chore: init worker selector
This commit is contained in:
@@ -292,7 +292,6 @@ const AddModal: FC<AddModalProps> = (props) => {
|
||||
deploymentType === 'modelList' && (
|
||||
<TitleWrapper>
|
||||
{intl.formatMessage({ id: 'models.form.configurations' })}
|
||||
<span style={{ display: 'flex', height: 24 }}></span>
|
||||
</TitleWrapper>
|
||||
)}
|
||||
<DataForm
|
||||
|
||||
@@ -259,8 +259,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
);
|
||||
await updateModel({
|
||||
data: {
|
||||
...result.values,
|
||||
..._.omit(data, result.omits)
|
||||
...result.values
|
||||
},
|
||||
id: currentData.current?.id as number
|
||||
});
|
||||
@@ -296,8 +295,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
|
||||
const modelData = await createModel({
|
||||
data: {
|
||||
...result.values,
|
||||
..._.omit(data, result.omits)
|
||||
...result.values
|
||||
}
|
||||
});
|
||||
setOpenDeployModal({
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import '../style/title-wrapper.less';
|
||||
|
||||
const TitleWrapper: React.FC<any> = ({ children }) => {
|
||||
return <h3 className="h3">{children}</h3>;
|
||||
return (
|
||||
<h3 className="h3" style={{ height: 50 }}>
|
||||
{children}
|
||||
</h3>
|
||||
);
|
||||
};
|
||||
|
||||
export default TitleWrapper;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { StatusMaps } from '@/config';
|
||||
import { EditOutlined } from '@ant-design/icons';
|
||||
import _ from 'lodash';
|
||||
|
||||
export const ollamaModelOptions = [
|
||||
{
|
||||
@@ -345,8 +346,7 @@ export const getSourceRepoConfigValue = (
|
||||
source: string,
|
||||
data: any
|
||||
): {
|
||||
values: Record<string, any>;
|
||||
omits: string[];
|
||||
values: typeof data;
|
||||
} => {
|
||||
const config: Record<string, any> = sourceRepoConfig[source] || {};
|
||||
const result: Record<string, any> = {};
|
||||
@@ -359,8 +359,7 @@ export const getSourceRepoConfigValue = (
|
||||
});
|
||||
|
||||
return {
|
||||
values: result,
|
||||
omits: omits
|
||||
values: { ...result, ..._.omit(data, omits) }
|
||||
};
|
||||
};
|
||||
|
||||
@@ -369,7 +368,6 @@ export const setSourceRepoConfigValue = (
|
||||
data: any
|
||||
): {
|
||||
values: Record<string, any>;
|
||||
omits: string[];
|
||||
} => {
|
||||
const config: Record<string, any> = sourceRepoConfig[source] || {};
|
||||
const result: Record<string, any> = {};
|
||||
@@ -382,8 +380,7 @@ export const setSourceRepoConfigValue = (
|
||||
});
|
||||
|
||||
return {
|
||||
values: result,
|
||||
omits: omits
|
||||
values: { ...result, ..._.omit(data, omits) }
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,6 @@ export const useGenerateFormEditInitialValues = () => {
|
||||
|
||||
const formData = {
|
||||
...result.values,
|
||||
..._.omit(data, result.omits),
|
||||
categories: data?.categories?.length ? data.categories[0] : null,
|
||||
scheduleType: data?.gpu_selector ? 'manual' : 'auto',
|
||||
gpu_selector: data?.gpu_selector?.gpu_ids?.length
|
||||
|
||||
Reference in New Issue
Block a user