You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

components.ts 42 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294
  1. import { defineMock } from 'umi';
  2. export default defineMock({
  3. 'GET /api/mmp/workflow/235': {
  4. code: 200,
  5. msg: '操作成功',
  6. data: {
  7. id: 233,
  8. name: '分布式训练',
  9. description: 'aa',
  10. dag: {
  11. nodes: [
  12. {
  13. id: 'git-clone-c0724278',
  14. category_id: 1,
  15. component_name: 'git-clone',
  16. component_label: '代码拉取组件',
  17. task_info: {
  18. image: {
  19. type: 'ref',
  20. item_type: 'image',
  21. label: '镜像',
  22. value: null,
  23. visible: false,
  24. editable: false,
  25. require: 1,
  26. default: '',
  27. condition: '',
  28. description: '克隆代码的镜像',
  29. placeholder: '请选择镜像',
  30. rulers: {},
  31. },
  32. working_directory: {
  33. type: 'str',
  34. item_type: '',
  35. label: '工作目录',
  36. value: '',
  37. visible: false,
  38. editable: false,
  39. require: 1,
  40. default: '',
  41. placeholder: '请输入工作目录',
  42. condition: '',
  43. description: '容器内的工作目录',
  44. rulers: {},
  45. },
  46. command: {
  47. type: 'str',
  48. item_type: '',
  49. label: '启动命令',
  50. value: '',
  51. visible: false,
  52. editable: false,
  53. require: 1,
  54. default: '',
  55. placeholder: '请输入启动命令',
  56. description: '启动命令,不包括运行参数',
  57. rulers: '',
  58. },
  59. run_args: {
  60. type: 'map',
  61. item_type: '',
  62. label: '运行参数',
  63. value: [],
  64. visible: false,
  65. editable: false,
  66. require: 0,
  67. default: '',
  68. placeholder: '',
  69. condition: '',
  70. description: '运行命令的参数',
  71. rulers: '',
  72. },
  73. resources_standard: {
  74. type: 'select',
  75. item_type: 'resource',
  76. label: '资源',
  77. value: {},
  78. visible: false,
  79. editable: false,
  80. require: 1,
  81. default: '',
  82. placeholder: '',
  83. condition: '',
  84. description: '资源规格',
  85. rulers: {},
  86. },
  87. },
  88. control_strategy: {
  89. retry_times: {
  90. type: 'str',
  91. item_type: '',
  92. label: '重试次数',
  93. require: 0,
  94. default: '',
  95. placeholder: '',
  96. describe: '任务重试次数',
  97. visible: true,
  98. editable: false,
  99. condition: '',
  100. value: '',
  101. rulers: {},
  102. },
  103. max_run_times: {
  104. type: 'str',
  105. item_type: '',
  106. label: '最大运行时间',
  107. require: 0,
  108. default: '',
  109. placeholder: '',
  110. describe: '最大运行时间',
  111. editable: false,
  112. visible: true,
  113. condition: '',
  114. value: '',
  115. rulers: {},
  116. },
  117. },
  118. in_parameters: {
  119. '--code_config': {
  120. type: 'ref',
  121. item_type: 'code',
  122. label: '代码配置',
  123. require: 1,
  124. default: '',
  125. placeholder: '私有仓库填写ssh地址,公有仓库填写https git地址',
  126. describe:
  127. '代码配置,支持私有仓库和公有仓库,私有仓库填写ssh地址,公有仓库填写https git地址',
  128. editable: false,
  129. visible: true,
  130. condition: '',
  131. value: {
  132. id: 21,
  133. code_repo_name: '原子掺杂识别',
  134. code_repo_vis: 1,
  135. is_public: true,
  136. git_url: 'https://gitlink.org.cn/somunslotus/material-atom-predict.git',
  137. git_branch: 'master',
  138. verify_mode: null,
  139. git_user_name: null,
  140. git_password: null,
  141. ssh_key: null,
  142. create_by: 'admin',
  143. create_time: '2025-03-12T16:46:08.000+08:00',
  144. update_by: 'admin',
  145. update_time: '2025-03-14T14:59:19.000+08:00',
  146. state: 1,
  147. },
  148. rulers: {},
  149. showValue: '原子掺杂识别',
  150. fromSelect: true,
  151. },
  152. },
  153. out_parameters: {
  154. '--code_output': {
  155. type: 'str',
  156. item_type: 'code',
  157. label: '代码保存路径',
  158. require: 1,
  159. default: '/code',
  160. editable: false,
  161. visible: true,
  162. placeholder: '代码保存路径',
  163. describe: '代码保存路径',
  164. condition: '',
  165. showValue: '/mycode',
  166. value: '/mycode',
  167. rulers: {},
  168. fromSelect: false,
  169. },
  170. },
  171. available_range: 0,
  172. description: '代码拉取组件',
  173. icon_path: 'component-icon-1',
  174. create_by: 'admin',
  175. create_time: '2024-09-02T06:08:06.000+08:00',
  176. update_by: 'admin',
  177. update_time: '2024-09-02T06:08:06.000+08:00',
  178. state: 1,
  179. env_variables: [],
  180. x: 612,
  181. y: 215,
  182. label: '代码拉取',
  183. img: '/assets/images/component-icon-1.png',
  184. isCluster: false,
  185. formError: false,
  186. type: 'rect-node',
  187. size: [110, 36],
  188. labelCfg: {
  189. style: {
  190. fill: 'transparent',
  191. fontSize: 0,
  192. boxShadow: '0px 0px 12px rgba(75, 84, 137, 0.05)',
  193. overflow: 'hidden',
  194. x: -20,
  195. y: 0,
  196. textAlign: 'left',
  197. textBaseline: 'middle',
  198. },
  199. },
  200. style: {
  201. active: {
  202. fill: 'rgb(247, 250, 255)',
  203. stroke: 'rgb(95, 149, 255)',
  204. lineWidth: 2,
  205. shadowColor: 'rgb(95, 149, 255)',
  206. shadowBlur: 10,
  207. },
  208. selected: {
  209. fill: 'rgb(255, 255, 255)',
  210. stroke: 'rgb(95, 149, 255)',
  211. lineWidth: 4,
  212. shadowColor: 'rgb(95, 149, 255)',
  213. shadowBlur: 10,
  214. 'text-shape': {
  215. fontWeight: 500,
  216. },
  217. },
  218. highlight: {
  219. fill: 'rgb(223, 234, 255)',
  220. stroke: '#4572d9',
  221. lineWidth: 2,
  222. 'text-shape': {
  223. fontWeight: 500,
  224. },
  225. },
  226. inactive: {
  227. fill: 'rgb(247, 250, 255)',
  228. stroke: 'rgb(191, 213, 255)',
  229. lineWidth: 1,
  230. },
  231. disable: {
  232. fill: 'rgb(250, 250, 250)',
  233. stroke: 'rgb(224, 224, 224)',
  234. lineWidth: 1,
  235. },
  236. fill: '#fff',
  237. stroke: 'transparent',
  238. cursor: 'pointer',
  239. radius: 8,
  240. shadowColor: 'rgba(75, 84, 137, 0.4)',
  241. shadowBlur: 6,
  242. shadowOffsetX: 0,
  243. shadowOffsetY: 0,
  244. overflow: 'hidden',
  245. lineWidth: 0.5,
  246. },
  247. depth: 0,
  248. },
  249. {
  250. id: 'model-train-39e9bc7c',
  251. category_id: 2,
  252. component_name: 'model-train',
  253. component_label: '模型训练',
  254. task_info: {
  255. image: {
  256. type: 'ref',
  257. item_type: 'image',
  258. label: '镜像',
  259. value: {},
  260. visible: true,
  261. editable: true,
  262. require: 1,
  263. default: '',
  264. condition: '',
  265. description: '镜像',
  266. placeholder: '',
  267. rulers: {},
  268. },
  269. working_directory: {
  270. type: 'str',
  271. item_type: '',
  272. label: '工作目录',
  273. value: '{{git-clone-c0724278.--code_output}}',
  274. visible: true,
  275. editable: true,
  276. require: 1,
  277. default: '',
  278. placeholder: '',
  279. condition: '',
  280. description: '容器内的工作目录',
  281. rulers: {},
  282. },
  283. command: {
  284. type: 'str',
  285. item_type: '',
  286. label: '启动命令',
  287. value: 'conda run -n atom-predict python recognize_dophant/egnn/train_pl_vor.py',
  288. visible: true,
  289. editable: true,
  290. require: 1,
  291. default: '',
  292. placeholder: '',
  293. description: '启动命令,不包括运行参数',
  294. rulers: '',
  295. },
  296. run_args: {
  297. type: 'map',
  298. item_type: '',
  299. label: '运行参数',
  300. value: [],
  301. visible: true,
  302. editable: true,
  303. require: 0,
  304. default: '',
  305. placeholder: '',
  306. condition: '',
  307. description: '运行命令的参数',
  308. rulers: '',
  309. },
  310. resources_standard: {
  311. type: 'select',
  312. item_type: 'resource',
  313. label: '资源',
  314. value: {
  315. id: 30,
  316. resource_id: 4,
  317. computing_resource: 'CPU',
  318. standard: {
  319. name: 'CPU',
  320. value: {
  321. gpu: 0,
  322. cpu: 4,
  323. memory: '8GB',
  324. },
  325. },
  326. description: 'GPU: 0, CPU:4, 内存: 8GB',
  327. cpu_cores: 4,
  328. memory_gb: 8,
  329. gpu_memory_gb: 0,
  330. gpu_nums: 0,
  331. credit_per_hour: 2.0,
  332. labels: 'accelertor=cpu',
  333. create_by: 'admin',
  334. create_time: '2024-04-19T11:39:40.000+08:00',
  335. update_by: 'admin',
  336. update_time: '2024-04-19T11:39:40.000+08:00',
  337. state: 1,
  338. },
  339. visible: true,
  340. editable: true,
  341. require: 1,
  342. default: '',
  343. placeholder: '',
  344. condition: '',
  345. description: '资源规格',
  346. rulers: {},
  347. },
  348. },
  349. control_strategy: {
  350. retry_times: {
  351. type: 'str',
  352. item_type: '',
  353. label: '重试次数',
  354. require: 0,
  355. default: '',
  356. placeholder: '',
  357. describe: '任务重试次数',
  358. visible: true,
  359. editable: true,
  360. condition: '',
  361. value: '',
  362. rulers: {},
  363. },
  364. max_run_times: {
  365. type: 'str',
  366. item_type: '',
  367. label: '最大运行时间',
  368. require: 0,
  369. default: '',
  370. placeholder: '',
  371. describe: '最大运行时间',
  372. editable: true,
  373. visible: true,
  374. condition: '',
  375. value: '',
  376. rulers: {},
  377. },
  378. },
  379. in_parameters: {
  380. '--dataset': {
  381. type: 'ref',
  382. item_type: 'dataset',
  383. label: '选择数据集',
  384. require: 1,
  385. default: '',
  386. placeholder: '',
  387. describe: '选择数据集',
  388. condition: '',
  389. visible: true,
  390. editable: true,
  391. value: {
  392. id: '73',
  393. name: '原子掺杂识别场景测试',
  394. version: 'v1',
  395. path: 'fanshuai/datasets/73/fanshuai_dataset_20250519103524/v1/dataset',
  396. identifier: 'fanshuai_dataset_20250519103524',
  397. owner: 'fanshuai',
  398. },
  399. rulers: {},
  400. showValue: '原子掺杂识别场景测试:v1',
  401. fromSelect: true,
  402. activeTab: 'Private',
  403. expandedKeys: ['73'],
  404. checkedKeys: ['73-v1'],
  405. },
  406. '--model_name': {
  407. type: 'ref',
  408. item_type: 'model',
  409. label: '选择模型',
  410. require: 0,
  411. default: '',
  412. placeholder: '',
  413. describe: '最大运行时间',
  414. editable: true,
  415. visible: true,
  416. condition: '',
  417. value: {
  418. id: '39',
  419. name: '原子参杂识别模型',
  420. version: 'v1',
  421. path: 'fanshuai/model/39/fanshuai_model_20250513113514/v1/model',
  422. identifier: 'fanshuai_model_20250513113514',
  423. owner: 'fanshuai',
  424. },
  425. rulers: {},
  426. showValue: '原子参杂识别模型:v1',
  427. fromSelect: true,
  428. activeTab: 'Private',
  429. expandedKeys: ['39'],
  430. checkedKeys: ['39-v1'],
  431. },
  432. },
  433. out_parameters: {
  434. '--model_output': {
  435. type: 'str',
  436. item_type: '',
  437. label: '模型输出路径',
  438. require: 1,
  439. showValue: '/model',
  440. default: '',
  441. placeholder: '',
  442. describe: '模型输出路径',
  443. editable: true,
  444. visible: true,
  445. rulers: {},
  446. condition: '',
  447. value: '/model',
  448. fromSelect: false,
  449. },
  450. },
  451. available_range: 1,
  452. description: '通用模型训练组件介绍',
  453. icon_path: 'component-icon-2',
  454. create_by: 'admin',
  455. create_time: '2024-05-28T07:33:53.000+08:00',
  456. update_by: 'admin',
  457. update_time: '2024-05-28T07:33:53.000+08:00',
  458. state: 1,
  459. env_variables: [],
  460. x: 596,
  461. y: 348,
  462. label: '模型训练',
  463. img: '/assets/images/component-icon-2.png',
  464. isCluster: false,
  465. formError: false,
  466. type: 'rect-node',
  467. size: [110, 36],
  468. labelCfg: {
  469. style: {
  470. fill: 'transparent',
  471. fontSize: 0,
  472. boxShadow: '0px 0px 12px rgba(75, 84, 137, 0.05)',
  473. overflow: 'hidden',
  474. x: -20,
  475. y: 0,
  476. textAlign: 'left',
  477. textBaseline: 'middle',
  478. },
  479. },
  480. style: {
  481. active: {
  482. fill: 'rgb(247, 250, 255)',
  483. stroke: 'rgb(95, 149, 255)',
  484. lineWidth: 2,
  485. shadowColor: 'rgb(95, 149, 255)',
  486. shadowBlur: 10,
  487. },
  488. selected: {
  489. fill: 'rgb(255, 255, 255)',
  490. stroke: 'rgb(95, 149, 255)',
  491. lineWidth: 4,
  492. shadowColor: 'rgb(95, 149, 255)',
  493. shadowBlur: 10,
  494. 'text-shape': {
  495. fontWeight: 500,
  496. },
  497. },
  498. highlight: {
  499. fill: 'rgb(223, 234, 255)',
  500. stroke: '#4572d9',
  501. lineWidth: 2,
  502. 'text-shape': {
  503. fontWeight: 500,
  504. },
  505. },
  506. inactive: {
  507. fill: 'rgb(247, 250, 255)',
  508. stroke: 'rgb(191, 213, 255)',
  509. lineWidth: 1,
  510. },
  511. disable: {
  512. fill: 'rgb(250, 250, 250)',
  513. stroke: 'rgb(224, 224, 224)',
  514. lineWidth: 1,
  515. },
  516. fill: '#fff',
  517. stroke: 'transparent',
  518. cursor: 'pointer',
  519. radius: 8,
  520. shadowColor: 'rgba(75, 84, 137, 0.4)',
  521. shadowBlur: 6,
  522. shadowOffsetX: 0,
  523. shadowOffsetY: 0,
  524. overflow: 'hidden',
  525. lineWidth: 0.5,
  526. },
  527. depth: 0,
  528. },
  529. {
  530. id: 'model-evaluate-c5b68e7c',
  531. category_id: 4,
  532. component_name: 'model-evaluate',
  533. component_label: '模型测试',
  534. task_info: {
  535. image: {
  536. type: 'ref',
  537. item_type: 'image',
  538. label: '镜像',
  539. value: {
  540. id: 15,
  541. image_id: 17,
  542. version: 'v1',
  543. description: null,
  544. url: '172.20.32.187/machine-learning/atom-egnn:v2',
  545. tag_name: 'v1',
  546. file_size: '125MB',
  547. status: 'Available',
  548. create_by: 'fanshuai',
  549. create_time: '2024-04-18T00:00:00.000+08:00',
  550. update_by: 'admin',
  551. update_time: '2024-04-18T00:00:00.000+08:00',
  552. state: 1,
  553. host_ip: null,
  554. },
  555. visible: false,
  556. editable: false,
  557. require: 0,
  558. default: '',
  559. condition: '',
  560. description: '镜像',
  561. placeholder: '',
  562. rulers: {},
  563. },
  564. working_directory: {
  565. type: 'str',
  566. item_type: '',
  567. label: '工作目录',
  568. value: '{{git-clone-c0724278.--code_output}}',
  569. visible: false,
  570. editable: false,
  571. require: 0,
  572. default: '',
  573. placeholder: '',
  574. condition: '',
  575. description: '容器内的工作目录',
  576. rulers: {},
  577. },
  578. command: {
  579. type: 'str',
  580. item_type: '',
  581. label: '启动命令',
  582. value: 'conda run -n atom-predict python recognize_dophant/egnn/test_pl_vor.py',
  583. visible: false,
  584. editable: false,
  585. require: 0,
  586. default: '',
  587. placeholder: '',
  588. description: '启动命令,不包括运行参数',
  589. rulers: '',
  590. },
  591. run_args: {
  592. type: 'map',
  593. item_type: '',
  594. label: '运行参数',
  595. value: [],
  596. visible: false,
  597. editable: false,
  598. require: 0,
  599. default: '',
  600. placeholder: '',
  601. condition: '',
  602. description: '运行命令的参数',
  603. rulers: '',
  604. },
  605. resources_standard: {
  606. type: 'select',
  607. item_type: 'resource',
  608. label: '资源',
  609. value: {
  610. id: 30,
  611. resource_id: 4,
  612. computing_resource: 'CPU',
  613. standard: {
  614. name: 'CPU',
  615. value: {
  616. gpu: 0,
  617. cpu: 4,
  618. memory: '8GB',
  619. },
  620. },
  621. description: 'GPU: 0, CPU:4, 内存: 8GB',
  622. cpu_cores: 4,
  623. memory_gb: 8,
  624. gpu_memory_gb: 0,
  625. gpu_nums: 0,
  626. credit_per_hour: 2.0,
  627. labels: 'accelertor=cpu',
  628. create_by: 'admin',
  629. create_time: '2024-04-19T11:39:40.000+08:00',
  630. update_by: 'admin',
  631. update_time: '2024-04-19T11:39:40.000+08:00',
  632. state: 1,
  633. },
  634. visible: true,
  635. editable: true,
  636. require: 1,
  637. default: '',
  638. placeholder: '',
  639. condition: '',
  640. description: '资源规格',
  641. rulers: {},
  642. },
  643. },
  644. control_strategy: {
  645. retry_times: {
  646. type: 'str',
  647. item_type: '',
  648. label: '重试次数',
  649. require: 0,
  650. default: '',
  651. placeholder: '',
  652. describe: '任务重试次数',
  653. visible: true,
  654. editable: true,
  655. condition: '',
  656. value: '',
  657. rulers: {},
  658. },
  659. max_run_times: {
  660. type: 'str',
  661. item_type: '',
  662. label: '最大运行时间',
  663. require: 0,
  664. default: '',
  665. placeholder: '',
  666. describe: '最大运行时间',
  667. editable: true,
  668. visible: true,
  669. condition: '',
  670. value: '',
  671. rulers: {},
  672. },
  673. },
  674. in_parameters: {
  675. '--dataset': {
  676. type: 'ref',
  677. item_type: 'dataset',
  678. label: '选择数据集',
  679. require: 1,
  680. default: '',
  681. placeholder: '',
  682. describe: '选择数据集',
  683. condition: '',
  684. editable: true,
  685. visible: true,
  686. value: {
  687. id: '74',
  688. name: '原子掺杂识别模型测试数据集',
  689. version: 'v2',
  690. path: 'fanshuai/datasets/74/fanshuai_dataset_20250519103749/v2/dataset',
  691. identifier: 'fanshuai_dataset_20250519103749',
  692. owner: 'fanshuai',
  693. },
  694. rulers: {},
  695. showValue: '原子掺杂识别模型测试数据集:v2',
  696. fromSelect: true,
  697. activeTab: 'Private',
  698. expandedKeys: ['74'],
  699. checkedKeys: ['74-v2'],
  700. },
  701. '--model_name': {
  702. type: 'ref',
  703. item_type: 'model',
  704. label: '选择模型',
  705. require: 1,
  706. editable: true,
  707. visible: true,
  708. rulers: {},
  709. default: '',
  710. placeholder: '',
  711. describe: '这里是这个参数的描述和备注',
  712. condition: '',
  713. value: '{{model-train-39e9bc7c.--model_output}}',
  714. showValue: '{{model-train-39e9bc7c.--model_output}}',
  715. fromSelect: true,
  716. },
  717. },
  718. out_parameters: {
  719. '--model_output': {
  720. type: 'str',
  721. item_type: '',
  722. label: '模型测试结果路径',
  723. editable: true,
  724. visible: true,
  725. rulers: {},
  726. default: '',
  727. placeholder: '',
  728. describe: '这里是这个参数的描述和备注',
  729. condition: '',
  730. require: 1,
  731. showValue: '/result',
  732. value: '/result',
  733. fromSelect: false,
  734. },
  735. },
  736. available_range: 1,
  737. description: '模型测试',
  738. icon_path: 'component-icon-4',
  739. create_by: 'admin',
  740. create_time: '2024-05-24T07:00:10.000+08:00',
  741. update_by: 'admin',
  742. update_time: '2024-05-24T07:00:10.000+08:00',
  743. state: 1,
  744. env_variables: [],
  745. x: 600,
  746. y: 460,
  747. label: '模型评估',
  748. img: '/assets/images/component-icon-4.png',
  749. isCluster: false,
  750. formError: false,
  751. type: 'rect-node',
  752. size: [110, 36],
  753. labelCfg: {
  754. style: {
  755. fill: 'transparent',
  756. fontSize: 0,
  757. boxShadow: '0px 0px 12px rgba(75, 84, 137, 0.05)',
  758. overflow: 'hidden',
  759. x: -20,
  760. y: 0,
  761. textAlign: 'left',
  762. textBaseline: 'middle',
  763. },
  764. },
  765. style: {
  766. active: {
  767. fill: 'rgb(247, 250, 255)',
  768. stroke: 'rgb(95, 149, 255)',
  769. lineWidth: 2,
  770. shadowColor: 'rgb(95, 149, 255)',
  771. shadowBlur: 10,
  772. },
  773. selected: {
  774. fill: 'rgb(255, 255, 255)',
  775. stroke: 'rgb(95, 149, 255)',
  776. lineWidth: 4,
  777. shadowColor: 'rgb(95, 149, 255)',
  778. shadowBlur: 10,
  779. 'text-shape': {
  780. fontWeight: 500,
  781. },
  782. },
  783. highlight: {
  784. fill: 'rgb(223, 234, 255)',
  785. stroke: '#4572d9',
  786. lineWidth: 2,
  787. 'text-shape': {
  788. fontWeight: 500,
  789. },
  790. },
  791. inactive: {
  792. fill: 'rgb(247, 250, 255)',
  793. stroke: 'rgb(191, 213, 255)',
  794. lineWidth: 1,
  795. },
  796. disable: {
  797. fill: 'rgb(250, 250, 250)',
  798. stroke: 'rgb(224, 224, 224)',
  799. lineWidth: 1,
  800. },
  801. fill: '#fff',
  802. stroke: 'transparent',
  803. cursor: 'pointer',
  804. radius: 8,
  805. shadowColor: 'rgba(75, 84, 137, 0.4)',
  806. shadowBlur: 6,
  807. shadowOffsetX: 0,
  808. shadowOffsetY: 0,
  809. overflow: 'hidden',
  810. lineWidth: 0.5,
  811. },
  812. depth: 0,
  813. },
  814. {
  815. id: 'model-export-edcf438e',
  816. category_id: 6,
  817. component_name: 'model-export',
  818. component_label: '模型导出',
  819. task_info: {
  820. image: {
  821. type: 'ref',
  822. item_type: 'image',
  823. label: '镜像',
  824. value: {},
  825. visible: true,
  826. editable: true,
  827. require: 1,
  828. default: '',
  829. condition: '',
  830. description: '镜像',
  831. placeholder: '',
  832. rulers: {},
  833. },
  834. working_directory: {
  835. type: 'str',
  836. item_type: '',
  837. label: '工作目录',
  838. value: '{{git-clone-c0724278.--code_output}}',
  839. visible: true,
  840. editable: true,
  841. require: 1,
  842. default: '',
  843. placeholder: '',
  844. condition: '',
  845. description: '容器内的工作目录',
  846. rulers: {},
  847. },
  848. command: {
  849. type: 'str',
  850. item_type: '',
  851. label: '启动命令',
  852. value: 'conda run -n atom-predict python recognize_dophant/egnn/test_pl_vor.py',
  853. visible: true,
  854. editable: true,
  855. require: 1,
  856. default: '',
  857. placeholder: '',
  858. description: '启动命令,不包括运行参数',
  859. rulers: '',
  860. },
  861. run_args: {
  862. type: 'map',
  863. item_type: '',
  864. label: '运行参数',
  865. value: [],
  866. visible: true,
  867. editable: true,
  868. require: 0,
  869. default: '',
  870. placeholder: '',
  871. condition: '',
  872. description: '运行命令的参数',
  873. rulers: '',
  874. },
  875. resources_standard: {
  876. type: 'select',
  877. item_type: 'resource',
  878. label: '资源',
  879. value: {},
  880. visible: false,
  881. editable: false,
  882. require: 1,
  883. default: '',
  884. placeholder: '',
  885. condition: '',
  886. description: '资源规格',
  887. rulers: {},
  888. },
  889. },
  890. control_strategy: {
  891. retry_times: {
  892. type: 'str',
  893. item_type: '',
  894. label: '重试次数',
  895. require: 0,
  896. default: '',
  897. placeholder: '',
  898. describe: '任务重试次数',
  899. visible: true,
  900. editable: true,
  901. condition: '',
  902. value: '',
  903. rulers: {},
  904. },
  905. max_run_times: {
  906. type: 'str',
  907. item_type: '',
  908. label: '最大运行时间',
  909. require: 0,
  910. default: '',
  911. placeholder: '',
  912. describe: '最大运行时间',
  913. editable: true,
  914. visible: true,
  915. condition: '',
  916. value: '',
  917. rulers: {},
  918. },
  919. },
  920. in_parameters: {
  921. '--model_source': {
  922. type: 'str',
  923. item_type: '',
  924. label: '模型来源',
  925. require: 1,
  926. default: '',
  927. placeholder: '模型来源',
  928. describe: '模型来源',
  929. editable: true,
  930. visible: true,
  931. condition: '',
  932. value: '{{model-train-39e9bc7c.--model_output}}',
  933. rulers: {},
  934. fromSelect: true,
  935. showValue: '{{model-train-39e9bc7c.--model_output}}',
  936. },
  937. '--model_id': {
  938. type: 'select',
  939. item_type: 'model',
  940. label: '导出到模型',
  941. require: 1,
  942. default: '',
  943. placeholder: '',
  944. describe: '导出到模型',
  945. editable: true,
  946. visible: true,
  947. condition: '',
  948. value: {
  949. id: '76',
  950. name: '原子掺杂识别模型场景测试',
  951. identifier: 'fanshuai_model_20250519105223',
  952. owner: 'fanshuai',
  953. },
  954. rulers: {},
  955. },
  956. '--version': {
  957. type: 'str',
  958. item_type: '',
  959. label: '模型版本',
  960. require: 1,
  961. choice: [],
  962. default: '1',
  963. placeholder: '',
  964. describe: '模型版本',
  965. editable: false,
  966. condition: '',
  967. showValue: '${model_version}',
  968. value: '${model_version}',
  969. fromSelect: false,
  970. },
  971. '--description': {
  972. type: 'str',
  973. item_type: '',
  974. label: '版本描述',
  975. require: 1,
  976. choice: [],
  977. default: '',
  978. placeholder: '版本描述',
  979. describe: '版本描述',
  980. editable: false,
  981. condition: '',
  982. showValue: '流水线自动导出',
  983. value: '流水线自动导出',
  984. fromSelect: false,
  985. },
  986. },
  987. available_range: 0,
  988. description: '模型导出',
  989. icon_path: 'component-icon-8',
  990. create_by: 'admin',
  991. create_time: '2024-05-29T01:12:01.000+08:00',
  992. update_by: 'admin',
  993. update_time: '2024-05-29T09:11:55.000+08:00',
  994. state: 1,
  995. env_variables: [],
  996. x: 592,
  997. y: 581,
  998. label: '模型导出',
  999. img: '/assets/images/component-icon-8.png',
  1000. isCluster: false,
  1001. formError: false,
  1002. type: 'rect-node',
  1003. size: [110, 36],
  1004. labelCfg: {
  1005. style: {
  1006. fill: 'transparent',
  1007. fontSize: 0,
  1008. boxShadow: '0px 0px 12px rgba(75, 84, 137, 0.05)',
  1009. overflow: 'hidden',
  1010. x: -20,
  1011. y: 0,
  1012. textAlign: 'left',
  1013. textBaseline: 'middle',
  1014. },
  1015. },
  1016. style: {
  1017. active: {
  1018. fill: 'rgb(247, 250, 255)',
  1019. stroke: 'rgb(95, 149, 255)',
  1020. lineWidth: 2,
  1021. shadowColor: 'rgb(95, 149, 255)',
  1022. shadowBlur: 10,
  1023. },
  1024. selected: {
  1025. fill: 'rgb(255, 255, 255)',
  1026. stroke: 'rgb(95, 149, 255)',
  1027. lineWidth: 4,
  1028. shadowColor: 'rgb(95, 149, 255)',
  1029. shadowBlur: 10,
  1030. 'text-shape': {
  1031. fontWeight: 500,
  1032. },
  1033. },
  1034. highlight: {
  1035. fill: 'rgb(223, 234, 255)',
  1036. stroke: '#4572d9',
  1037. lineWidth: 2,
  1038. 'text-shape': {
  1039. fontWeight: 500,
  1040. },
  1041. },
  1042. inactive: {
  1043. fill: 'rgb(247, 250, 255)',
  1044. stroke: 'rgb(191, 213, 255)',
  1045. lineWidth: 1,
  1046. },
  1047. disable: {
  1048. fill: 'rgb(250, 250, 250)',
  1049. stroke: 'rgb(224, 224, 224)',
  1050. lineWidth: 1,
  1051. },
  1052. fill: '#fff',
  1053. stroke: 'transparent',
  1054. cursor: 'pointer',
  1055. radius: 8,
  1056. shadowColor: 'rgba(75, 84, 137, 0.4)',
  1057. shadowBlur: 6,
  1058. shadowOffsetX: 0,
  1059. shadowOffsetY: 0,
  1060. overflow: 'hidden',
  1061. lineWidth: 0.5,
  1062. },
  1063. depth: 0,
  1064. },
  1065. ],
  1066. edges: [
  1067. {
  1068. source: 'git-clone-c0724278',
  1069. target: 'model-train-39e9bc7c',
  1070. style: {
  1071. endArrow: {
  1072. path: 'M 6,0 L 9,-1.5 L 9,1.5 Z',
  1073. d: 4.5,
  1074. fill: '#CDD0DC',
  1075. },
  1076. cursor: 'pointer',
  1077. lineWidth: 1,
  1078. lineAppendWidth: 4,
  1079. opacity: 1,
  1080. stroke: '#CDD0DC',
  1081. radius: 1,
  1082. active: {
  1083. stroke: 'rgb(95, 149, 255)',
  1084. lineWidth: 1,
  1085. },
  1086. selected: {
  1087. stroke: 'rgb(95, 149, 255)',
  1088. lineWidth: 2,
  1089. shadowColor: 'rgb(95, 149, 255)',
  1090. shadowBlur: 10,
  1091. 'text-shape': {
  1092. fontWeight: 500,
  1093. },
  1094. },
  1095. highlight: {
  1096. stroke: 'rgb(95, 149, 255)',
  1097. lineWidth: 2,
  1098. 'text-shape': {
  1099. fontWeight: 500,
  1100. },
  1101. },
  1102. inactive: {
  1103. stroke: 'rgb(234, 234, 234)',
  1104. lineWidth: 1,
  1105. },
  1106. disable: {
  1107. stroke: 'rgb(245, 245, 245)',
  1108. lineWidth: 1,
  1109. },
  1110. },
  1111. labelCfg: {
  1112. autoRotate: true,
  1113. style: {
  1114. fontSize: 10,
  1115. fill: '#FFF',
  1116. },
  1117. },
  1118. id: 'edge-0.163955357654560491741769193740',
  1119. startPoint: {
  1120. x: 612,
  1121. y: 233.25,
  1122. anchorIndex: 1,
  1123. },
  1124. endPoint: {
  1125. x: 596,
  1126. y: 329.75,
  1127. anchorIndex: 0,
  1128. },
  1129. sourceAnchor: 1,
  1130. targetAnchor: 0,
  1131. type: 'cubic-vertical',
  1132. curvePosition: [0.5, 0.5],
  1133. minCurveOffset: [0, 0],
  1134. depth: 0,
  1135. },
  1136. {
  1137. source: 'model-train-39e9bc7c',
  1138. target: 'model-evaluate-c5b68e7c',
  1139. style: {
  1140. endArrow: {
  1141. path: 'M 6,0 L 9,-1.5 L 9,1.5 Z',
  1142. d: 4.5,
  1143. fill: '#CDD0DC',
  1144. },
  1145. cursor: 'pointer',
  1146. lineWidth: 1,
  1147. lineAppendWidth: 4,
  1148. opacity: 1,
  1149. stroke: '#CDD0DC',
  1150. radius: 1,
  1151. active: {
  1152. stroke: 'rgb(95, 149, 255)',
  1153. lineWidth: 1,
  1154. },
  1155. selected: {
  1156. stroke: 'rgb(95, 149, 255)',
  1157. lineWidth: 2,
  1158. shadowColor: 'rgb(95, 149, 255)',
  1159. shadowBlur: 10,
  1160. 'text-shape': {
  1161. fontWeight: 500,
  1162. },
  1163. },
  1164. highlight: {
  1165. stroke: 'rgb(95, 149, 255)',
  1166. lineWidth: 2,
  1167. 'text-shape': {
  1168. fontWeight: 500,
  1169. },
  1170. },
  1171. inactive: {
  1172. stroke: 'rgb(234, 234, 234)',
  1173. lineWidth: 1,
  1174. },
  1175. disable: {
  1176. stroke: 'rgb(245, 245, 245)',
  1177. lineWidth: 1,
  1178. },
  1179. },
  1180. labelCfg: {
  1181. autoRotate: true,
  1182. style: {
  1183. fontSize: 10,
  1184. fill: '#FFF',
  1185. },
  1186. },
  1187. id: 'edge-0.150681812754051241741769198063',
  1188. startPoint: {
  1189. x: 596,
  1190. y: 366.25,
  1191. anchorIndex: 1,
  1192. },
  1193. endPoint: {
  1194. x: 600,
  1195. y: 441.75,
  1196. anchorIndex: 0,
  1197. },
  1198. sourceAnchor: 1,
  1199. targetAnchor: 0,
  1200. type: 'cubic-vertical',
  1201. curvePosition: [0.5, 0.5],
  1202. minCurveOffset: [0, 0],
  1203. depth: 0,
  1204. },
  1205. {
  1206. source: 'model-evaluate-c5b68e7c',
  1207. target: 'model-export-edcf438e',
  1208. style: {
  1209. endArrow: {
  1210. path: 'M 6,0 L 9,-1.5 L 9,1.5 Z',
  1211. d: 4.5,
  1212. fill: '#CDD0DC',
  1213. },
  1214. cursor: 'pointer',
  1215. lineWidth: 1,
  1216. lineAppendWidth: 4,
  1217. opacity: 1,
  1218. stroke: '#CDD0DC',
  1219. radius: 1,
  1220. active: {
  1221. stroke: 'rgb(95, 149, 255)',
  1222. lineWidth: 1,
  1223. },
  1224. selected: {
  1225. stroke: 'rgb(95, 149, 255)',
  1226. lineWidth: 2,
  1227. shadowColor: 'rgb(95, 149, 255)',
  1228. shadowBlur: 10,
  1229. 'text-shape': {
  1230. fontWeight: 500,
  1231. },
  1232. },
  1233. highlight: {
  1234. stroke: 'rgb(95, 149, 255)',
  1235. lineWidth: 2,
  1236. 'text-shape': {
  1237. fontWeight: 500,
  1238. },
  1239. },
  1240. inactive: {
  1241. stroke: 'rgb(234, 234, 234)',
  1242. lineWidth: 1,
  1243. },
  1244. disable: {
  1245. stroke: 'rgb(245, 245, 245)',
  1246. lineWidth: 1,
  1247. },
  1248. },
  1249. labelCfg: {
  1250. autoRotate: true,
  1251. style: {
  1252. fontSize: 10,
  1253. fill: '#FFF',
  1254. },
  1255. },
  1256. id: 'edge-0.40652053406360491741769205906',
  1257. startPoint: {
  1258. x: 600,
  1259. y: 478.25,
  1260. anchorIndex: 1,
  1261. },
  1262. endPoint: {
  1263. x: 592,
  1264. y: 562.75,
  1265. anchorIndex: 0,
  1266. },
  1267. sourceAnchor: 1,
  1268. targetAnchor: 0,
  1269. type: 'cubic-vertical',
  1270. curvePosition: [0.5, 0.5],
  1271. minCurveOffset: [0, 0],
  1272. depth: 0,
  1273. },
  1274. ],
  1275. combos: [],
  1276. },
  1277. global_param: null,
  1278. create_by: 'fanshuai',
  1279. create_time: '2025-06-19T19:50:47.000+08:00',
  1280. update_by: 'fanshuai',
  1281. update_time: '2025-06-24T09:28:28.000+08:00',
  1282. state: 1,
  1283. },
  1284. },
  1285. });