You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
import { request } from "@/components/service/index";
|
|
|
|
|
|
|
|
|
|
export const MlflowService = {
|
|
|
|
|
getRuns: (experimentId: string) => {
|
|
|
|
|
return request.get("/api/mlflow/runs", {
|
|
|
|
|
experimentId,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getExperimentByName: (experimentName: string) => {
|
|
|
|
|
return request.get("/api/mlflow/experiment", {
|
|
|
|
|
experimentName,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getExperimentRun: (runId: string) => {
|
|
|
|
|
return request.get("/api/mlflow/run", {
|
|
|
|
|
runId,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
artifact: (runId: string, path?: string) => {
|
|
|
|
|
const params: Record<string, any> = {
|
|
|
|
|
runId,
|
|
|
|
|
run_id: runId,
|
|
|
|
|
};
|
|
|
|
|
if (path !== undefined) params.path = path;
|
|
|
|
|
|
|
|
|
|
// 1차: /list 시도 → 404면 구(舊) 경로로 폴백
|
|
|
|
|
return request
|
|
|
|
|
.get("/api/mlflow/artifacts/list", params)
|
|
|
|
|
.catch((err: any) => {
|
|
|
|
|
if (err?.response?.status === 404) {
|
|
|
|
|
return request.get("/api/mlflow/artifacts", params);
|
|
|
|
|
}
|
|
|
|
|
throw err;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
};
|