You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/batch/batch-python.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ The `custom_id` is required to allow you to identify which individual batch requ
75
75
76
76
### Create input file
77
77
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.
79
79
80
80
## Upload batch file
81
81
@@ -144,7 +144,7 @@ file_id = file.id
144
144
145
145
---
146
146
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:
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.
190
190
191
191
> [!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.
193
193
194
194
**Output:**
195
195
@@ -222,7 +222,7 @@ The default 500 max file limit per resource also applies to output files. Here y
222
222
}
223
223
```
224
224
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).
226
226
227
227
## Track batch job progress
228
228
@@ -332,7 +332,7 @@ if output_file_id:
332
332
333
333
**Output:**
334
334
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:
336
336
337
337
```json
338
338
{
@@ -450,7 +450,7 @@ print(all_jobs)
450
450
451
451
Use the REST API to list all batch jobs with additional sorting/filtering options.
452
452
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'`.
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.
Copy file name to clipboardExpand all lines: articles/ai-services/openai/includes/batch/batch-rest.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ The `custom_id` is required to allow you to identify which individual batch requ
65
65
66
66
### Create input file
67
67
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.
69
69
70
70
## Upload batch file
71
71
@@ -86,7 +86,7 @@ curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/files?api-versio
86
86
87
87
The above code assumes a particular file path for your test.jsonl file. Adjust this file path as necessary for your local system.
88
88
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.
90
90
91
91
92
92
@@ -154,7 +154,7 @@ curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-vers
154
154
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.
155
155
156
156
> [!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.
158
158
159
159
**Output:**
160
160
@@ -236,7 +236,7 @@ The following status values are possible:
236
236
|`in_progress`|The input file was successfully validated and the batch is currently running. |
237
237
|`finalizing`|The batch has completed and the results are being prepared. |
238
238
|`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.|
240
240
|`cancelling`|The batch is being `cancelled` (This can take up to 10 minutes to go into effect.) |
0 commit comments