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.

index.js 2.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * @Author: 赵伟
  3. * @Date: 2024-11-18 10:18:27
  4. * @Description: 主动学习
  5. */
  6. import { request } from '@umijs/max';
  7. // 分页查询超参数自动寻优
  8. export function getActiveLearnListReq(params, skipLoading) {
  9. return request(`/api/mmp/activeLearn`, {
  10. method: 'GET',
  11. params,
  12. skipLoading
  13. });
  14. }
  15. // 查询超参数自动寻优详情
  16. export function getActiveLearnInfoReq(params) {
  17. return request(`/api/mmp/activeLearn/getActiveLearnDetail`, {
  18. method: 'GET',
  19. params,
  20. });
  21. }
  22. // 新增超参数自动寻优
  23. export function addActiveLearnReq(data) {
  24. return request(`/api/mmp/activeLearn`, {
  25. method: 'POST',
  26. data,
  27. });
  28. }
  29. // 编辑超参数自动寻优
  30. export function updateActiveLearnReq(data) {
  31. return request(`/api/mmp/activeLearn`, {
  32. method: 'PUT',
  33. data,
  34. });
  35. }
  36. // 删除超参数自动寻优
  37. export function deleteActiveLearnReq(id) {
  38. return request(`/api/mmp/activeLearn/${id}`, {
  39. method: 'DELETE',
  40. });
  41. }
  42. // 运行超参数自动寻优
  43. export function runActiveLearnReq(id) {
  44. return request(`/api/mmp/activeLearn/run/${id}`, {
  45. method: 'POST',
  46. });
  47. }
  48. // ----------------------- 实验实例 -----------------------
  49. // 获取实验实例列表
  50. export function getActiveLearnInsListReq(params, skipLoading) {
  51. return request(`/api/mmp/activeLearnIns`, {
  52. method: 'GET',
  53. params,
  54. skipLoading
  55. });
  56. }
  57. // 查询实验实例详情
  58. export function getActiveLearnInsReq(id) {
  59. return request(`/api/mmp/activeLearnIns/${id}`, {
  60. method: 'GET',
  61. });
  62. }
  63. // 停止实验实例
  64. export function stopActiveLearnInsReq(id) {
  65. return request(`/api/mmp/activeLearnIns/${id}`, {
  66. method: 'PUT',
  67. });
  68. }
  69. // 删除实验实例
  70. export function deleteActiveLearnInsReq(id) {
  71. return request(`/api/mmp/activeLearnIns/${id}`, {
  72. method: 'DELETE',
  73. });
  74. }
  75. // 批量删除实验实例
  76. export function batchDeleteActiveLearnInsReq(data) {
  77. return request(`/api/mmp/activeLearnIns/batchDelete`, {
  78. method: 'DELETE',
  79. data,
  80. });
  81. }
  82. // 获取当前实验的指标对比地址
  83. export function getExpMetricsReq(data) {
  84. return request(`/api/mmp/activeLearnIns/getExpMetrics`, {
  85. method: 'POST',
  86. data,
  87. });
  88. }
  89. // 编辑实验实例
  90. export function editActiveLearnInsReq(data) {
  91. return request(`/api/mmp/activeLearnIns`, {
  92. method: 'PUT',
  93. data,
  94. skipLoading: true,
  95. });
  96. }