@@ -2699,7 +2699,7 @@ class DeleteMlModel(Runner):
26992699 @time_func
27002700 async def __call__ (self , opensearch , params ):
27012701 async def _is_deployed (model_id ):
2702- resp = await opensearch .transport .perform_request ('GET' , '_plugins/_ml/models/' + model_id )
2702+ resp = await opensearch .transport .perform_request ('GET' , '/ _plugins/_ml/models/' + model_id )
27032703 state = resp .get ('model_state' )
27042704 return state in ('PARTIALLY_DEPLOYED' , 'DEPLOYED' )
27052705
@@ -2770,14 +2770,14 @@ async def __call__(self, opensearch, params):
27702770 break
27712771
27722772 if not model_id :
2773- resp = await opensearch .transport .perform_request ('POST' , '_plugins/_ml/models/_register' , body = body )
2773+ resp = await opensearch .transport .perform_request ('POST' , '/ _plugins/_ml/models/_register' , body = body )
27742774 task_id = resp .get ('task_id' )
27752775 timeout = params .get ('timeout' , 120 )
27762776 end = time .time () + timeout
27772777 state = 'CREATED'
27782778 while state == 'CREATED' and time .time () < end :
27792779 await asyncio .sleep (5 )
2780- resp = await opensearch .transport .perform_request ('GET' , '_plugins/_ml/tasks/' + task_id )
2780+ resp = await opensearch .transport .perform_request ('GET' , '/ _plugins/_ml/tasks/' + task_id )
27812781 state = resp .get ('state' )
27822782 if state == 'FAILED' :
27832783 raise exceptions .BenchmarkError ("Failed to register ml-model. Error: {}" .format (resp ['error' ]))
@@ -2799,14 +2799,14 @@ async def __call__(self, opensearch, params):
27992799 d = json .loads (f .read ())
28002800 model_id = d ['model_id' ]
28012801
2802- resp = await opensearch .transport .perform_request ('POST' , '_plugins/_ml/models/' + model_id + '/_deploy' )
2802+ resp = await opensearch .transport .perform_request ('POST' , '/ _plugins/_ml/models/' + model_id + '/_deploy' )
28032803 task_id = resp .get ('task_id' )
28042804 timeout = params .get ('timeout' , 120 )
28052805 end = time .time () + timeout
28062806 state = 'RUNNING'
28072807 while state == 'RUNNING' and time .time () < end :
28082808 await asyncio .sleep (5 )
2809- resp = await opensearch .transport .perform_request ('GET' , '_plugins/_ml/tasks/' + task_id )
2809+ resp = await opensearch .transport .perform_request ('GET' , '/ _plugins/_ml/tasks/' + task_id )
28102810 state = resp .get ('state' )
28112811 if state == 'FAILED' :
28122812 raise exceptions .BenchmarkError ("Failed to deploy ml-model. Error: {}" .format (resp ['error' ]))
0 commit comments