Skip to content

Commit

Permalink
[ML] call job validation endpoint with complete payload (elastic#62331)
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Apr 3, 2020
1 parent 8b1bc82 commit 8dd8d65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,15 @@ export const ml = {
});
},

validateJob({ job }: { job: Job }) {
const body = JSON.stringify({ job });
validateJob(payload: {
job: Job;
duration: {
start?: number;
end?: number;
};
fields?: any[];
}) {
const body = JSON.stringify(payload);
return http<any>({
path: `${basePath()}/validate/job`,
method: 'POST',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function validateModelMemoryLimit(

// if there is no duration, do not run the estimate test
const runCalcModelMemoryTest =
duration && typeof duration?.start !== undefined && duration?.end !== undefined;
duration && duration?.start !== undefined && duration?.end !== undefined;

// retrieve the max_model_memory_limit value from the server
// this will be unset unless the user has set this on their cluster
Expand Down

0 comments on commit 8dd8d65

Please sign in to comment.