most-client 1.0.46__py3-none-any.whl → 1.0.47__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- most/api.py +22 -18
- most/async_api.py +22 -18
- {most_client-1.0.46.dist-info → most_client-1.0.47.dist-info}/METADATA +1 -1
- {most_client-1.0.46.dist-info → most_client-1.0.47.dist-info}/RECORD +7 -7
- {most_client-1.0.46.dist-info → most_client-1.0.47.dist-info}/WHEEL +0 -0
- {most_client-1.0.46.dist-info → most_client-1.0.47.dist-info}/top_level.txt +0 -0
- {most_client-1.0.46.dist-info → most_client-1.0.47.dist-info}/zip-safe +0 -0
most/api.py
CHANGED
@@ -327,53 +327,57 @@ class MostClient(object):
|
|
327
327
|
result = self.get_score_modifier().modify(result)
|
328
328
|
return result
|
329
329
|
|
330
|
-
def get_job_status(self,
|
330
|
+
def get_job_status(self, data_id,
|
331
|
+
data_source: Literal["text", "audio"] = "audio") -> JobStatus:
|
331
332
|
if not is_valid_id(self.model_id):
|
332
333
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
333
334
|
|
334
|
-
if not is_valid_id(
|
335
|
-
raise RuntimeError("Please use valid
|
335
|
+
if not is_valid_id(data_id):
|
336
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
336
337
|
|
337
|
-
resp = self.post(f"/{self.client_id}/
|
338
|
+
resp = self.post(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/apply_status")
|
338
339
|
return self.retort.load(resp.json(), JobStatus)
|
339
340
|
|
340
|
-
def fetch_results(self,
|
341
|
-
modify_scores: bool = False
|
341
|
+
def fetch_results(self, data_id,
|
342
|
+
modify_scores: bool = False,
|
343
|
+
data_source: Literal["text", "audio"] = "audio") -> Result:
|
342
344
|
if not is_valid_id(self.model_id):
|
343
345
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
344
346
|
|
345
|
-
if not is_valid_id(
|
346
|
-
raise RuntimeError("Please use valid
|
347
|
+
if not is_valid_id(data_id):
|
348
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
347
349
|
|
348
|
-
resp = self.get(f"/{self.client_id}/
|
350
|
+
resp = self.get(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/results")
|
349
351
|
result = self.retort.load(resp.json(), Result)
|
350
352
|
if modify_scores:
|
351
353
|
result = self.get_score_modifier().modify(result)
|
352
354
|
return result
|
353
355
|
|
354
|
-
def fetch_text(self,
|
356
|
+
def fetch_text(self, data_id: str,
|
357
|
+
data_source: Literal["text", "audio"] = "audio") -> Result:
|
355
358
|
if not is_valid_id(self.model_id):
|
356
359
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
357
360
|
|
358
|
-
if not is_valid_id(
|
359
|
-
raise RuntimeError("Please use valid
|
361
|
+
if not is_valid_id(data_id):
|
362
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
360
363
|
|
361
|
-
resp = self.get(f"/{self.client_id}/
|
364
|
+
resp = self.get(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/text")
|
362
365
|
return self.retort.load(resp.json(), Result)
|
363
366
|
|
364
|
-
def fetch_dialog(self,
|
365
|
-
transcribator_name: Optional[Literal["GroundTruth"]] = None
|
367
|
+
def fetch_dialog(self, data_id: str,
|
368
|
+
transcribator_name: Optional[Literal["GroundTruth"]] = None,
|
369
|
+
data_source: Literal["text", "audio"] = "audio") -> DialogResult:
|
366
370
|
if not is_valid_id(self.model_id):
|
367
371
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
368
372
|
|
369
|
-
if not is_valid_id(
|
370
|
-
raise RuntimeError("Please use valid
|
373
|
+
if not is_valid_id(data_id):
|
374
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
371
375
|
|
372
376
|
params = {}
|
373
377
|
if transcribator_name is not None:
|
374
378
|
params["transcribator_name"] = transcribator_name
|
375
379
|
|
376
|
-
resp = self.get(f"/{self.client_id}/
|
380
|
+
resp = self.get(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/dialog",
|
377
381
|
params=params)
|
378
382
|
return self.retort.load(resp.json(), DialogResult)
|
379
383
|
|
most/async_api.py
CHANGED
@@ -339,53 +339,57 @@ class AsyncMostClient(object):
|
|
339
339
|
result = score_modifier.modify(result)
|
340
340
|
return result
|
341
341
|
|
342
|
-
async def get_job_status(self,
|
342
|
+
async def get_job_status(self, data_id: str,
|
343
|
+
data_source: Literal["text", "audio"] = "audio") -> JobStatus:
|
343
344
|
if not is_valid_id(self.model_id):
|
344
345
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
345
346
|
|
346
|
-
if not is_valid_id(
|
347
|
-
raise RuntimeError("Please use valid
|
347
|
+
if not is_valid_id(data_id):
|
348
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
348
349
|
|
349
|
-
resp = await self.post(f"/{self.client_id}/
|
350
|
+
resp = await self.post(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/apply_status")
|
350
351
|
return self.retort.load(resp.json(), JobStatus)
|
351
352
|
|
352
|
-
async def fetch_results(self,
|
353
|
-
modify_scores: bool = False
|
353
|
+
async def fetch_results(self, data_id: str,
|
354
|
+
modify_scores: bool = False,
|
355
|
+
data_source: Literal["text", "audio"] = "audio") -> Result:
|
354
356
|
if not is_valid_id(self.model_id):
|
355
357
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
356
358
|
|
357
|
-
if not is_valid_id(
|
358
|
-
raise RuntimeError("Please use valid
|
359
|
+
if not is_valid_id(data_id):
|
360
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
359
361
|
|
360
|
-
resp = await self.get(f"/{self.client_id}/
|
362
|
+
resp = await self.get(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/results")
|
361
363
|
result = self.retort.load(resp.json(), Result)
|
362
364
|
if modify_scores:
|
363
365
|
score_modifier = await self.get_score_modifier()
|
364
366
|
result = score_modifier.modify(result)
|
365
367
|
return result
|
366
368
|
|
367
|
-
async def fetch_text(self,
|
369
|
+
async def fetch_text(self, data_id: str,
|
370
|
+
data_source: Literal["text", "audio"] = "audio") -> Result:
|
368
371
|
if not is_valid_id(self.model_id):
|
369
372
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
370
373
|
|
371
|
-
if not is_valid_id(
|
372
|
-
raise RuntimeError("Please use valid
|
374
|
+
if not is_valid_id(data_id):
|
375
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
373
376
|
|
374
|
-
resp = await self.get(f"/{self.client_id}/
|
377
|
+
resp = await self.get(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/text")
|
375
378
|
return self.retort.load(resp.json(), Result)
|
376
379
|
|
377
|
-
async def fetch_dialog(self,
|
378
|
-
transcribator_name: Optional[Literal["GroundTruth"]] = None
|
380
|
+
async def fetch_dialog(self, data_id,
|
381
|
+
transcribator_name: Optional[Literal["GroundTruth"]] = None,
|
382
|
+
data_source: Literal["text", "audio"] = "audio") -> DialogResult:
|
379
383
|
if not is_valid_id(self.model_id):
|
380
384
|
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
381
385
|
|
382
|
-
if not is_valid_id(
|
383
|
-
raise RuntimeError("Please use valid
|
386
|
+
if not is_valid_id(data_id):
|
387
|
+
raise RuntimeError("Please use valid data_id. [try audio.id / text.id from list_audios() / list_texts()]")
|
384
388
|
|
385
389
|
params = {}
|
386
390
|
if transcribator_name is not None:
|
387
391
|
params["transcribator_name"] = transcribator_name
|
388
|
-
resp = await self.get(f"/{self.client_id}/
|
392
|
+
resp = await self.get(f"/{self.client_id}/{data_source}/{data_id}/model/{self.model_id}/dialog",
|
389
393
|
params=params)
|
390
394
|
return self.retort.load(resp.json(), DialogResult)
|
391
395
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
most/__init__.py,sha256=ZA2n_h824tfGd5tFl3RsD0noUyv_T08fBoBxMEgxmzs,548
|
2
2
|
most/_constrants.py,sha256=SlHKcBoXwe_sPzk8tdbb7lqhQz-Bfo__FhSoeFWodZE,217
|
3
|
-
most/api.py,sha256=
|
4
|
-
most/async_api.py,sha256=
|
3
|
+
most/api.py,sha256=R2oLfklXUe-Pc5w3Wbu_CII8Cq1vpJm0YDIw75BVN_Y,20915
|
4
|
+
most/async_api.py,sha256=zmVyUKZ5EbQZT0Lsg7OEQzSU188Kpf8SDUAZ9dCXpXI,22322
|
5
5
|
most/async_catalog.py,sha256=LgQ5zghQtDMnqq-WjmRHqZkqcdixZnHtmoRaVv74VKM,1059
|
6
6
|
most/async_glossary.py,sha256=nehgkQvqENxT5vnmMiRLSWgD0jFr2Hzs7yqNZfC9ahs,1281
|
7
7
|
most/async_searcher.py,sha256=C0zViW20K7OhKO1BzBZktTbMJYBBvor3uK6LAHZTxz0,2238
|
@@ -13,8 +13,8 @@ most/search_types.py,sha256=GFwXaDJV4qI_gaFZToLMHoYH-JXVfIVwfVTgJ7RDWoY,7211
|
|
13
13
|
most/searcher.py,sha256=9UdiSlScsE6EPc6RpK8xkRLeB5gHNxgPQpXTJ17i3lQ,2135
|
14
14
|
most/trainer_api.py,sha256=ZwOv4mhROfY97n6i7IY_ZpafsuNRazOqMBAf2dh708k,992
|
15
15
|
most/types.py,sha256=7o8uqhQd8FbO7H50TMJPbSIG4VyyX-LumWYRlHeqwgg,5343
|
16
|
-
most_client-1.0.
|
17
|
-
most_client-1.0.
|
18
|
-
most_client-1.0.
|
19
|
-
most_client-1.0.
|
20
|
-
most_client-1.0.
|
16
|
+
most_client-1.0.47.dist-info/METADATA,sha256=eDFZczK8eeAZXyOLWew3-pIFCNSfIikD39E20w7KQ6E,1027
|
17
|
+
most_client-1.0.47.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
18
|
+
most_client-1.0.47.dist-info/top_level.txt,sha256=2g5fk02LKkM1hV3pVVti_LQ60TToLBcR2zQ3JEKGVk8,5
|
19
|
+
most_client-1.0.47.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
20
|
+
most_client-1.0.47.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|