fix: miss model file path in cloning
This commit is contained in:
@@ -9,6 +9,7 @@ import styled from 'styled-components';
|
||||
import { backendTipsList } from '../config';
|
||||
import { backendOptionsMap } from '../config/backend-parameters';
|
||||
import { useFormContext } from '../config/form-context';
|
||||
import useCompareEnvs from '../hooks/use-compare-envs';
|
||||
|
||||
const CaretDownWrapper = styled.span`
|
||||
display: flex;
|
||||
@@ -36,6 +37,7 @@ const BackendFields: React.FC = () => {
|
||||
} = useFormContext();
|
||||
const backend = Form.useWatch('backend', form);
|
||||
const [showDeprecated, setShowDeprecated] = React.useState<boolean>(false);
|
||||
const { openTips, handleToggleTips, handleCompareEnvs } = useCompareEnvs();
|
||||
|
||||
const handleBackendVersionOnChange = (value: any, option: any) => {
|
||||
if (Object.keys(option.data?.env || {}).length > 0) {
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import { WarningOutlined } from '@ant-design/icons';
|
||||
import { Alert, Popover } from 'antd';
|
||||
import React from 'react';
|
||||
|
||||
interface EnvsOverridePopoverProps {
|
||||
open: boolean;
|
||||
dataList: any[];
|
||||
onToggle: (open: boolean) => void;
|
||||
}
|
||||
|
||||
const EnvsOverridePopover: React.FC<EnvsOverridePopoverProps> = (props) => {
|
||||
const { open, onToggle } = props;
|
||||
return (
|
||||
<Popover
|
||||
content="override envs"
|
||||
onOpenChange={onToggle}
|
||||
trigger={'click'}
|
||||
styles={{
|
||||
container: {
|
||||
width: '100%'
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Alert
|
||||
onClick={() => onToggle(!open)}
|
||||
style={{ marginBlock: 16, cursor: 'pointer' }}
|
||||
icon={<WarningOutlined />}
|
||||
type="warning"
|
||||
showIcon
|
||||
title={'override envs'}
|
||||
></Alert>
|
||||
</Popover>
|
||||
);
|
||||
};
|
||||
|
||||
export default EnvsOverridePopover;
|
||||
@@ -171,19 +171,6 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
||||
};
|
||||
};
|
||||
|
||||
const checkIsGGUF = () => {
|
||||
const huggingface_filename = form.getFieldValue('huggingface_filename');
|
||||
const model_scope_model_id = form.getFieldValue('model_scope_model_id');
|
||||
const local_path = form.getFieldValue('local_path');
|
||||
|
||||
if (local_path) {
|
||||
const isEndwithGGUF = _.endsWith(local_path, '.gguf');
|
||||
const isBlobFile = local_path.split('/').pop().includes('sha256');
|
||||
return isEndwithGGUF || isBlobFile;
|
||||
}
|
||||
return huggingface_filename || model_scope_model_id;
|
||||
};
|
||||
|
||||
const updateFieldsOnGGUF = () => {
|
||||
// when isGGUF is true, set distributed_inference_across_workers and cpu_offloading to true
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user