Skip to content

Commit 0044d6e

Browse files
committed
be consequent of the use of run_async
1 parent 886773b commit 0044d6e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Version 11.4.0 - 2024-11-21
44

55
- Added `get_prediction`
6-
- Support sync argument for `create_predictions`
6+
- Support run_async argument for `create_predictions`
77
- Support `statistics_last_n_days` for `get_training`
88

99
## Version 11.3.0 - 2024-03-27

Diff for: las/client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ def delete_dataset(self, dataset_id: str, delete_documents: bool = False) -> Dic
646646
647647
:param dataset_id: Id of the dataset
648648
:type dataset_id: str
649-
:param delete_documents: Set to true to delete documents in dataset before deleting dataset
649+
:param delete_documents: Set to True to delete documents in dataset before deleting dataset
650650
:type delete_documents: bool
651651
:return: Dataset response from REST API
652652
:rtype: dict
@@ -1572,8 +1572,8 @@ def create_prediction(
15721572
{'strategy': 'BEST_N_PAGES', 'parameters': {'n': 3}}
15731573
{'strategy': 'BEST_N_PAGES', 'parameters': {'n': 3, 'collapse': False}}
15741574
:type postprocess_config: dict, optional
1575-
:param sync: If True run the prediction synchronously, if false run async. if omitted run synchronously
1576-
:type sync: bool
1575+
:param run_async: If True run the prediction async, if False run sync. if omitted run synchronously.
1576+
:type run_async: bool
15771577
:return: Prediction response from REST API
15781578
:rtype: dict
15791579

Diff for: tests/test_predictions.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
{'strategy': 'BEST_N_PAGES', 'parameters': {'n': 3, 'collapse': False}},
2121
None,
2222
])
23-
@pytest.mark.parametrize('sync', [True, False, None])
24-
def test_create_prediction(client: Client, preprocess_config, postprocess_config, sync):
23+
@pytest.mark.parametrize('run_async', [True, False, None])
24+
def test_create_prediction(client: Client, preprocess_config, postprocess_config, run_async):
2525
document_id = service.create_document_id()
2626
model_id = service.create_model_id()
2727
response = client.create_prediction(
2828
document_id,
2929
model_id,
3030
preprocess_config=dictstrip(preprocess_config) if preprocess_config else None,
3131
postprocess_config=postprocess_config,
32-
sync=sync,
32+
run_async=run_async,
3333
)
3434
assert 'predictionId' in response, 'Missing predictionId in response'
3535

0 commit comments

Comments
 (0)