Skip to content

Commit

Permalink
few doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
Mildophin committed Nov 21, 2024
1 parent 885c861 commit 732d8a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ sdk.get_batches(filters=BatchFilters(device_type=EmulatorType.EMU_TN))
sdk.get_batches(filters=BatchFilters(status=BatchStatus.DONE, project_id="project_id"))

# Get two batches using two ids
sdk.get_batches(filters=BatchFilters(id=["job_id_1", "job_id_2"]))
sdk.get_batches(filters=BatchFilters(id=["batch_id_1", "batch_id_2"]))

# Get the first 100 batches with HIGH priority from a specific project
sdk.get_batches(filters=BatchFilters(queue_priority=QueuePriority.HIGH))
Expand Down Expand Up @@ -315,7 +315,7 @@ sdk.cancel_batches(batch_ids=[...])

### Cancel a list of jobs

It is possible to cancel a selection of jobs with the `cancel_jobs` method, using the JobFilters class.
It is possible to cancel a selection of jobs with the `cancel_jobs` method, using the CancelJobFilters class.

Here are few examples of how to use it:

Expand All @@ -326,7 +326,7 @@ from pasqal_cloud import CancelJobFilters
# Cancel two specific jobs
sdk.cancel_jobs(batch_id="batch_id", filters=CancelJobFilters(id=["job_id_1", "job_id_2"]))

# Cancel jobs created in a given period from a specific batch
# Cancel jobs created in a given period of time
sdk.cancel_jobs(batch_id="batch_id", filters=CancelJobFilters(start_date=datetime(...), end_date=datetime(...)))
```

Expand Down
2 changes: 1 addition & 1 deletion pasqal_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def cancel_batch(self, id: str) -> Batch:

def cancel_batches(self, batch_ids: List[str]) -> BatchCancellationResponse:
"""
Cancel a group of batches matching the filters.
Cancel a group of batches by their ids.
Args:
batch_ids: batch ids to cancel.
Expand Down

0 comments on commit 732d8a4

Please sign in to comment.