chore: vllm params
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import LabelSelector from '@/components/label-selector';
|
||||
import ListInput from '@/components/list-input';
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import { PageAction } from '@/config';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import { InfoCircleOutlined, RightOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -191,7 +193,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
{/* <Form.Item name="backend">
|
||||
<Form.Item name="backend">
|
||||
<SealSelect
|
||||
label={intl.formatMessage({ id: 'models.form.backend' })}
|
||||
options={[
|
||||
@@ -208,8 +210,8 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
]}
|
||||
disabled={action === PageAction.EDIT}
|
||||
></SealSelect>
|
||||
</Form.Item> */}
|
||||
{/* <Form.Item<FormData> name="backend_parameters">
|
||||
</Form.Item>
|
||||
<Form.Item<FormData> name="backend_parameters">
|
||||
<ListInput
|
||||
btnText="common.button.addParams"
|
||||
label={intl.formatMessage({ id: 'models.form.backend_parameters' })}
|
||||
@@ -217,7 +219,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
onChange={handleBackendParametersChange}
|
||||
options={paramsConfig}
|
||||
></ListInput>
|
||||
</Form.Item> */}
|
||||
</Form.Item>
|
||||
{scheduleType === 'manual' && (
|
||||
<Form.Item<FormData>
|
||||
name="gpu_selector"
|
||||
|
||||
@@ -101,9 +101,6 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
||||
);
|
||||
|
||||
const handleOnSelectModel = () => {
|
||||
if (!props.selectedModel.name) {
|
||||
return;
|
||||
}
|
||||
let name = _.split(props.selectedModel.name, '/').slice(-1)[0];
|
||||
const reg = /(-gguf)$/i;
|
||||
name = _.toLower(name).replace(reg, '');
|
||||
|
||||
@@ -192,7 +192,6 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
}
|
||||
|
||||
const newList = generateGroupByFilename(list);
|
||||
console.log('newList====', newList);
|
||||
const sortList = _.sortBy(newList, (item: any) => {
|
||||
return sortType === 'size' ? item.size : item.path;
|
||||
});
|
||||
@@ -200,7 +199,6 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
handleSelectModelFile(sortList[0]);
|
||||
setDataSource({ fileList: sortList, loading: false });
|
||||
} catch (error) {
|
||||
console.log('error======', error);
|
||||
setDataSource({ fileList: [], loading: false });
|
||||
handleSelectModelFile({});
|
||||
}
|
||||
@@ -246,9 +244,12 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
fetchModelFiles: handleFetchModelFiles
|
||||
}));
|
||||
|
||||
// useEffect(() => {
|
||||
// handleFetchModelFiles();
|
||||
// }, [props.selectedModel.name]);
|
||||
useEffect(() => {
|
||||
if (!props.selectedModel.name) {
|
||||
setDataSource({ fileList: [], loading: false });
|
||||
handleSelectModelFile({});
|
||||
}
|
||||
}, [props.selectedModel.name]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
|
||||
@@ -96,7 +96,7 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
<div>{workerIp}</div>
|
||||
<div>
|
||||
{intl.formatMessage({ id: 'models.table.gpuindex' })}: [
|
||||
{_.join(item.gpu_indexes, ',')}]
|
||||
{_.join(item.gpu_indexes?.sort?.(), ',')}]
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -119,7 +119,7 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
worker_name: `${row.worker_name}`,
|
||||
worker_ip: `${row.worker_ip}`,
|
||||
port: row.port,
|
||||
gpu_index: `${row.gpu_indexes} (main)`
|
||||
gpu_index: `${row.gpu_indexes?.sort?.()} (main)`
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BulbOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Select } from 'antd';
|
||||
import { Checkbox, Select } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { queryHuggingfaceModels, queryModelScopeModels } from '../apis';
|
||||
@@ -22,7 +22,6 @@ interface SearchInputProps {
|
||||
}
|
||||
|
||||
const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
console.log('SearchModel======');
|
||||
const intl = useIntl();
|
||||
const { modelSource, setLoadingModel, onSourceChange, onSelectModel } = props;
|
||||
const [dataSource, setDataSource] = useState<{
|
||||
@@ -44,7 +43,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
const cacheRepoOptions = useRef<any[]>([]);
|
||||
const axiosTokenRef = useRef<any>(null);
|
||||
const searchInputRef = useRef<any>('');
|
||||
const filterGGUFRef = useRef<boolean>(true);
|
||||
const filterGGUFRef = useRef<boolean | undefined>();
|
||||
const modelFilesSortOptions = useRef<any[]>([
|
||||
{
|
||||
label: intl.formatMessage({ id: 'models.sort.trending' }),
|
||||
@@ -78,8 +77,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
search: {
|
||||
query: searchInputRef.current || '',
|
||||
sort: sort,
|
||||
// tags: filterGGUFRef.current ? ['gguf'] : [],
|
||||
tags: ['gguf'],
|
||||
tags: filterGGUFRef.current ? ['gguf'] : [],
|
||||
task
|
||||
}
|
||||
};
|
||||
@@ -103,10 +101,8 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
const getModelsFromModelscope = useCallback(async (sort: string) => {
|
||||
try {
|
||||
const params = {
|
||||
// Name: filterGGUFRef.current
|
||||
// ? `${searchInputRef.current} gguf`
|
||||
// : searchInputRef.current || '',
|
||||
Name: `${searchInputRef.current} gguf`,
|
||||
Name: `${searchInputRef.current}`,
|
||||
filterGGUF: filterGGUFRef.current,
|
||||
SortBy: ModelScopeSortType[sort]
|
||||
};
|
||||
const data = await queryModelScopeModels(params, {
|
||||
@@ -233,13 +229,13 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
</span>
|
||||
</span>
|
||||
<span>
|
||||
{/* <Checkbox
|
||||
<Checkbox
|
||||
onChange={handleFilterGGUFChange}
|
||||
className="m-r-5"
|
||||
checked={filterGGUFRef.current}
|
||||
>
|
||||
GGUF
|
||||
</Checkbox> */}
|
||||
</Checkbox>
|
||||
<Select
|
||||
allowClear
|
||||
value={dataSource.sortType}
|
||||
|
||||
Reference in New Issue
Block a user