Skip to content

Commit 68177f3

Browse files
committed
update
1 parent f144337 commit 68177f3

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

articles/ai-services/openai/includes/batch/batch-python.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The `custom_id` is required to allow you to identify which individual batch requ
7575
7676
### Create input file
7777

78-
For this article we'll create a file named `test.jsonl` and will copy the contents from standard input code block above to the file. You will need to modify and add your global batch deployment name to each line of the file. Save this file in the same directory that you're executing your Jupyter Notebook.
78+
For this article we'll create a file named `test.jsonl` and will copy the contents from standard input code block above to the file. You'll need to modify and add your global batch deployment name to each line of the file. Save this file in the same directory that you're executing your Jupyter Notebook.
7979

8080
## Upload batch file
8181

@@ -144,7 +144,7 @@ file_id = file.id
144144

145145
---
146146

147-
By uncommenting and adding `extra_body={"expires_after":{"seconds": 1209600, "anchor": "created_at"}}` you are setting our upload file to expire in 14 days. There is a max limit of 500 batch files per resource when no expiration is set. By setting a value for expiration the number of batch files per resource is increased to 10,000 files per resource. This feature is not currently available in all regions. Output when file upload expiration is set:
147+
By uncommenting and adding `extra_body={"expires_after":{"seconds": 1209600, "anchor": "created_at"}}` you're setting our upload file to expire in 14 days. There's a max limit of 500 batch files per resource when no expiration is set. By setting a value for expiration the number of batch files per resource is increased to 10,000 files per resource. This feature isn't currently available in all regions. Output when file upload expiration is set:
148148

149149
**Output:**
150150

@@ -186,10 +186,10 @@ print(batch_response.model_dump_json(indent=2))
186186

187187
```
188188

189-
The default 500 max file limit per resource also applies to output files. Here you can uncomment this line to add `extra_body={"output_expires_after":{"seconds": 1209600, "anchor": "created_at"}}` so that your output files expire in 14 days. By setting a value for expiration the number of batch files per resource is increased to 10,000 files per resource. This feature is not currently available in all regions.
189+
The default 500 max file limit per resource also applies to output files. Here you can uncomment this line to add `extra_body={"output_expires_after":{"seconds": 1209600, "anchor": "created_at"}}` so that your output files expire in 14 days. By setting a value for expiration the number of batch files per resource is increased to 10,000 files per resource. This feature isn't currently available in all regions.
190190

191191
> [!NOTE]
192-
> Currently the completion window must be set to 24h. If you set any other value than 24h your job will fail. Jobs taking longer than 24 hours will continue to execute until canceled.
192+
> Currently the completion window must be set to `24h`. If you set any other value than `24h` your job will fail. Jobs taking longer than 24 hours will continue to execute until canceled.
193193
194194
**Output:**
195195

@@ -222,7 +222,7 @@ The default 500 max file limit per resource also applies to output files. Here y
222222
}
223223
```
224224

225-
If your batch jobs are so large that you are hitting the enqueued token limit even after maxing out the quota for your deployment, certain regions now support a new [fail fast](#queueing-batch-jobs) feature that allows you to queue multiple batch jobs with exponential backoff so once one large batch job completes the next can be kicked off automatically. To learn more about what regions support this feature and how to adapt your code to take advantage of it, see [queuing batch jobs](#queueing-batch-jobs).
225+
If your batch jobs are so large that you're hitting the enqueued token limit even after maxing out the quota for your deployment, certain regions now support a new [fail fast](#queueing-batch-jobs) feature that allows you to queue multiple batch jobs with exponential backoff so once one large batch job completes the next can be kicked off automatically. To learn more about what regions support this feature and how to adapt your code to take advantage of it, see [queuing batch jobs](#queueing-batch-jobs).
226226

227227
## Track batch job progress
228228

@@ -332,7 +332,7 @@ if output_file_id:
332332

333333
**Output:**
334334

335-
For brevity, we are only including a single chat completion response of output. If you follow the steps in this article you should have three responses similar to the one below:
335+
For brevity, we're only including a single chat completion response of output. If you follow the steps in this article you should have three responses similar to the one below:
336336

337337
```json
338338
{
@@ -450,7 +450,7 @@ print(all_jobs)
450450

451451
Use the REST API to list all batch jobs with additional sorting/filtering options.
452452

453-
In the examples below we are providing the `generate_time_filter` function to make constructing the filter easier. If you don't wish to use this function the format of the filter string would look like `created_at gt 1728860560 and status eq 'Completed'`.
453+
In the examples below we're providing the `generate_time_filter` function to make constructing the filter easier. If you don't wish to use this function the format of the filter string would look like `created_at gt 1728860560 and status eq 'Completed'`.
454454

455455
# [Python (Microsoft Entra ID)](#tab/python-secure)
456456

@@ -647,7 +647,7 @@ else:
647647

648648
## Queueing batch jobs
649649

650-
If your batch jobs are so large that you are hitting the enqueued token limit even after maxing out the quota for your deployment, certain regions now support a new fail fast feature that allows you to queue multiple batch jobs with exponential backoff. Once one large batch job completes and your enqueued token quota is once again available, the next batch job can be created and kicked off automatically.
650+
If your batch jobs are so large that you're hitting the enqueued token limit even after maxing out the quota for your deployment, certain regions now support a new fail fast feature that allows you to queue multiple batch jobs with exponential backoff. Once one large batch job completes and your enqueued token quota is once again available, the next batch job can be created and kicked off automatically.
651651

652652
**Old behavior:**
653653

articles/ai-services/openai/includes/batch/batch-rest.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The `custom_id` is required to allow you to identify which individual batch requ
6565

6666
### Create input file
6767

68-
For this article we'll create a file named `test.jsonl` and will copy the contents from standard input code block above to the file. You will need to modify and add your global batch deployment name to each line of the file.
68+
For this article we'll create a file named `test.jsonl` and will copy the contents from standard input code block above to the file. You'll need to modify and add your global batch deployment name to each line of the file.
6969

7070
## Upload batch file
7171

@@ -86,7 +86,7 @@ curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files?api-versio
8686

8787
The above code assumes a particular file path for your test.jsonl file. Adjust this file path as necessary for your local system.
8888

89-
By adding the optional `"expires_after.seconds=1209600"` and `"expires_after.anchor=created_at"` parameters you are setting your upload file to expire in 14 days. There is a max limit of 500 batch files per resource when no expiration is set. By setting a value for expiration the number of batch files per resource is increased to 10,000 files per resource. You can set to a number between 1209600-2592000. This is equivalent to 14-30 days. This feature is not currently available in all regions.
89+
By adding the optional `"expires_after.seconds=1209600"` and `"expires_after.anchor=created_at"` parameters you're setting your upload file to expire in 14 days. There's a max limit of 500 batch files per resource when no expiration is set. By setting a value for expiration the number of batch files per resource is increased to 10,000 files per resource. You can set to a number between 1209600-2592000. This is equivalent to 14-30 days. This feature isn't currently available in all regions.
9090

9191

9292

@@ -154,7 +154,7 @@ curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-vers
154154
The default 500 max file limit per resource also applies to output files. Here you can optionally add `"output_expires_after":{"seconds": 1209600},` and `"anchor": "created_at"` so that your output files expire in 14 days. By setting a value for expiration the number of batch files per resource is increased to 10,000 files per resource. The file expiration feature is currently not available in all regions.
155155

156156
> [!NOTE]
157-
> Currently the completion window must be set to 24h. If you set any other value than 24h your job will fail. Jobs taking longer than 24 hours will continue to execute until canceled.
157+
> Currently the completion window must be set to `24h`. If you set any other value than `24h` your job will fail. Jobs taking longer than 24 hours will continue to execute until canceled.
158158
159159
**Output:**
160160

@@ -236,7 +236,7 @@ The following status values are possible:
236236
| `in_progress`|The input file was successfully validated and the batch is currently running. |
237237
| `finalizing`|The batch has completed and the results are being prepared. |
238238
| `completed`|The batch has been completed and the results are ready. |
239-
| `expired`|The batch was not able to be completed within the 24-hour time window.|
239+
| `expired`|The batch wasn't able to be completed within the 24-hour time window.|
240240
| `cancelling`|The batch is being `cancelled` (This can take up to 10 minutes to go into effect.) |
241241
| `cancelled`|the batch was `cancelled`.|
242242

0 commit comments

Comments
 (0)