-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Dall-E models code generation #35549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cf1c943
Adjusted commit hash to before the Dall-e changes
jpalvarezl d12be6f
Code gened for Dalle-E
jpalvarezl 7e15af1
Added comments for the sake of clarity
jpalvarezl 76779d2
Added Azure Core Experimental dependency
jpalvarezl f2f9219
ran code regen
jpalvarezl 93d25b1
Locked serviceVersion for a couple of tests
jpalvarezl 0d550ea
Adding tag to pom.xml new dependency
jpalvarezl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we consider to rename this method name.
"beginStart" sounds the same thing.
Might be "beginGenerateImage" since it is LRO and should have started with
beginprefix.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a downstream change from the TSP definition. Let's surface this feedback in the Wednesday meeting, if that works for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpalvarezl
There is something about the definition of this LRO in tsp that Java codegen being checking with author.
Azure/azure-rest-api-specs#24382 (comment)
And arch is checking on the terminal state.
https://github.com/Azure/azure-rest-api-specs/pull/24382/files#r1237679552
So, the LRO may not work as expected in runtime. If you do test it, please let me know the runtime log. Thanks in advance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. I've made a work item around this. It might be a couple of days before we get to the actual unit testing of this. Will keep you posted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Srikanta did a test
The final result is
{ "created": 1687461794, "expires": 1687548201, "id": "bc67228d-12ec-45c7-b73a-3b8486465dfe", "result": { "created": 1687461794, "data": [ { "url": "###" }, ... ] }, "status": "succeeded" }So the tsp definition on the LRO is wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A related topic: we also need some automation that runs when we update the autorest-java and typespec-java, to re-generate the SDK that has a codegen CI include, so that the upgrade on codegen won't break these CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am currently experiencing issues with the LRO in a sync scenario. For some reason I get 2 consecutive messages with status
notRunningwhich prevent the continuation of the request. Async works as expected:Sync call JSON:
{ "Entries": [ { "RequestUri": "https://REDACTED/openai/images/generations:submit?api-version=2023-06-01-preview", "RequestMethod": "POST", "RequestHeaders": { // ... }, "RequestBody": { "prompt": "A drawing of the Seattle skyline in the style of Van Gogh" }, "StatusCode": 202, "ResponseHeaders": { // ... }, "ResponseBody": { "id": "22ee7ca1-2ff3-4698-8ff9-94fb8e4e3c32", "status": "notRunning" } }, { "RequestUri": "https://REDACTED/openai/operations/images/22ee7ca1-2ff3-4698-8ff9-94fb8e4e3c32?api-version=2023-06-01-preview", "RequestMethod": "GET", "RequestHeaders": { // ... }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { // ... }, "ResponseBody": { "created": 1687797150, "id": "22ee7ca1-2ff3-4698-8ff9-94fb8e4e3c32", "status": "notRunning" } } ], "Variables": {} }The Async case:
{ "Entries": [ { "RequestUri": "https://REDACTED/openai/images/generations:submit?api-version=2023-06-01-preview", "RequestMethod": "POST", "RequestHeaders": { // ... }, "RequestBody": { "prompt": "A drawing of the Seattle skyline in the style of Van Gogh" }, "StatusCode": 202, "ResponseHeaders": { // ... }, "ResponseBody": { "id": "92da53f9-7d06-4d89-8a90-8667757f49b9", "status": "notRunning" } }, { "RequestUri": "https://REDACTED/openai/operations/images/92da53f9-7d06-4d89-8a90-8667757f49b9?api-version=2023-06-01-preview", "RequestMethod": "GET", "RequestHeaders": { // ... }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { // ... }, "ResponseBody": { "created": 1687796853, "id": "92da53f9-7d06-4d89-8a90-8667757f49b9", "status": "running" } }, { "RequestUri": "https://REDACTED/openai/operations/images/92da53f9-7d06-4d89-8a90-8667757f49b9?api-version=2023-06-01-preview", "RequestMethod": "GET", "RequestHeaders": { // ... }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { // ... }, "ResponseBody": { "created": 1687796853, "id": "92da53f9-7d06-4d89-8a90-8667757f49b9", "status": "running" } }, { "RequestUri": "https://REDACTED/openai/operations/images/92da53f9-7d06-4d89-8a90-8667757f49b9?api-version=2023-06-01-preview", "RequestMethod": "GET", "RequestHeaders": { // ... }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { // ... }, "ResponseBody": { "created": 1687796853, "expires": 1687883259, "id": "92da53f9-7d06-4d89-8a90-8667757f49b9", "result": { "created": 1687796853, "data": [ { "url": "REDACTED" } ] }, "status": "succeeded" } } ], "Variables": {} }There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can see in the sync scenario we never actually get to a
runningstate. Could be an issue with the local setup. Here is the code for Async:And for the sync version. (the commented out
optionsexhibit the same behaviour.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware that we had sync-stack enabled in openai. There were still a bug in pageable in current 1.40.0 core (that would be fixed in next 1.41.0 core).
OK, good thing is that openai don't have a pageable :-)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the problem with sync polling, I am suspicious of a possible bug in
SimpleSyncPoller. Investigating.Issue #35628. It seems current code would treat any unknown status as isComplete=true.
@samvaity saw one in purview as well. Maybe same cause.