Skip to content

Commit

Permalink
attempt 1 in fleet.specify type explicitly when pass a serialized object
Browse files Browse the repository at this point in the history
  • Loading branch information
restrry committed Feb 22, 2022
1 parent a24dc1f commit 4c43fee
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,20 @@ async function handleMlModelInstall({
try {
await retryTransientEsErrors(
() =>
esClient.ml.putTrainedModel({
model_id: mlModel.installationName,
defer_definition_decompression: true,
timeout: '45s',
// @ts-expect-error expects an object not a string
body: mlModel.content,
}),
esClient.ml.putTrainedModel(
{
model_id: mlModel.installationName,
defer_definition_decompression: true,
timeout: '45s',
// @ts-expect-error expects an object not a string
body: mlModel.content,
},
{
headers: {
'content-type': 'application/json',
},
}
),
{ logger }
);
} catch (err) {
Expand Down

0 comments on commit 4c43fee

Please sign in to comment.