fix: gguf input box is hidden when deploying from model files
This commit is contained in:
@@ -180,7 +180,7 @@ const Benchmark: React.FC = () => {
|
|||||||
loading={dataSource.loading}
|
loading={dataSource.loading}
|
||||||
loadend={dataSource.loadend}
|
loadend={dataSource.loadend}
|
||||||
dataSource={[]}
|
dataSource={[]}
|
||||||
image={<IconFont type="icon-credential-outline" />}
|
image={<IconFont type="icon-speed" />}
|
||||||
filters={_.omit(queryParams, ['sort_by'])}
|
filters={_.omit(queryParams, ['sort_by'])}
|
||||||
noFoundText={intl.formatMessage({
|
noFoundText={intl.formatMessage({
|
||||||
id: 'noresult.benchmark.nofound'
|
id: 'noresult.benchmark.nofound'
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
width = 600,
|
width = 600,
|
||||||
deploymentType = 'modelList',
|
deploymentType = 'modelList',
|
||||||
initialValues,
|
initialValues,
|
||||||
|
isGGUF: isGGUFProp,
|
||||||
clusterList
|
clusterList
|
||||||
} = props || {};
|
} = props || {};
|
||||||
const SEARCH_SOURCE = [
|
const SEARCH_SOURCE = [
|
||||||
@@ -543,6 +544,7 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open) {
|
if (open) {
|
||||||
|
setIsGGUF(isGGUFProp || false);
|
||||||
handleOnOpen();
|
handleOnOpen();
|
||||||
} else {
|
} else {
|
||||||
cancelEvaluate();
|
cancelEvaluate();
|
||||||
@@ -556,7 +558,7 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
message: []
|
message: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}, [open, clusterList, initialValues?.cluster_id]);
|
}, [open, clusterList, initialValues?.cluster_id, isGGUFProp]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GSDrawer
|
<GSDrawer
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ const DownloadModel: React.FC<AddModalProps> = (props) => {
|
|||||||
onCollapse={setCollapsed}
|
onCollapse={setCollapsed}
|
||||||
collapsed={collapsed}
|
collapsed={collapsed}
|
||||||
modelSource={props.source}
|
modelSource={props.source}
|
||||||
|
isGGUF={isGGUF}
|
||||||
setIsGGUF={handleSetIsGGUF}
|
setIsGGUF={handleSetIsGGUF}
|
||||||
></ModelCard>
|
></ModelCard>
|
||||||
{isGGUF && (
|
{isGGUF && (
|
||||||
|
|||||||
@@ -45,11 +45,6 @@ const BackendFields: React.FC = () => {
|
|||||||
useCompareEnvs();
|
useCompareEnvs();
|
||||||
|
|
||||||
const handleBackendVersionOnChange = (value: any, option: any) => {
|
const handleBackendVersionOnChange = (value: any, option: any) => {
|
||||||
// const oldEnvs = _.get(initialValues, 'env') || {};
|
|
||||||
// const newEnvs = option.data?.env || {};
|
|
||||||
|
|
||||||
// handleCompareEnvs(oldEnvs, newEnvs);
|
|
||||||
|
|
||||||
if (Object.keys(option.data?.env || {}).length > 0) {
|
if (Object.keys(option.data?.env || {}).length > 0) {
|
||||||
form.setFieldValue('env', { ...(option?.data?.env || {}) });
|
form.setFieldValue('env', { ...(option?.data?.env || {}) });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user