-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add AI examples extension #1196
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
Conversation
|
If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR: |
|
add to S164. |
src/index.json
Outdated
| "run_requires": [ | ||
| { | ||
| "requires": [ | ||
| "azure-cli-core" |
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.
No need to explicitly to specify azure-cli-core I think, azure-cli-extensions depends on azure-cli, and azure-cli depends on azure-cli-core.
You can have a try cause it failed 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.
OK, removing the azure-cli-core dependency.
src/ai-examples/setup.py
Outdated
| ] | ||
|
|
||
| DEPENDENCIES = [ | ||
| 'azure-cli-core' |
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.
No need to explicitly to specify azure-cli-core I think, azure-cli-extensions depends on azure-cli, and azure-cli depends on azure-cli-core.
You can have a try cause it failed 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.
OK, removing the azure-cli-core dependency.
haroldrandom
left a comment
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.
Please take a look comments and the reason why failed CI.
Please don't forget to update sha256Digest value once code change.
The next version of the CLI (presumably 2.0.81), will be needed for the extension to work. However, it seems that some of the build issues might be related to that version not existing. So to pass the CI/CD testing (and to check that there are no other issues), the extension min version has been set to the original default of 2.0.65.
|
OK, made the requested changes. One other thing that might be causing the problems is that this extension needs some code that hasn't yet shipped in the Azure CLI. I had the min version set to be 2.0.81 (presumably the next version), but as that doesn't yet exist, it might of caused an issue. For now I've reverted it to 2.0.65, but that needs to be updated before this PR gets merged. |
| { | ||
| "azext.isPreview": true, | ||
| "azext.minCliCoreVersion": "2.0.65", | ||
| "azext.maxCliCoreVersion": "2.1.0" |
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.
Can we remove this constraint if you are not sure about the max version requirement?
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.
Yes, good suggestion!
src/index.json
Outdated
| ], | ||
| "ai-examples": [ | ||
| { | ||
| "downloadUrl": "https://aladdinprodwestus.blob.core.windows.net/aladdin-extensions/ai_examples-0.1.0-py2.py3-none-any.whl", |
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.
download link should be generated by CLI team, and you don't need to provide it.
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.
OK, I was unclear how that was supposed to happen. I'll remove it for now.
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.
Err, how am I supposed to update the index.json then? I had been using the azdev extension publish command to do that up till now, but if y'all will be publishing it, that doesn't make sense to use. The azdev extension update-index command looks like the right thing, but it also needs a URL to work.
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.
@Juliehzl any update on this?
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.
Put whl file in CLI storage or your storage?
If no special reasons, usually we recommend to put whl file in our (CLI) storage as most of extensions do now. Also it's beneficial for our future release pipeline automation as pipeline automation has no access to your storage.
currently the workflow is:
- You build a whl file
- You send whl file to us
- We'll upload your whl file to our storage (as you don't have permission to upload to our storage)
- We tell you the downloadUrl
- You update the index.json with the downloadUrl we provide to you
In the future (one or two sprints later),
All these manual steps will be automated in our extension release pipeline.
|
|
||
| # Replacements for core functions | ||
| def provide_examples(help_file): | ||
| return replace_examples(help_file) |
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.
Can we provide two options for users to select?
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.
Because this is an experiment, we were planning on getting feedback for one scenario at a time. The append code is there, because that was the original plan, but we've decided to have just the Aladdin examples to better test them.
| 'Programming Language :: Python :: 3', | ||
| 'Programming Language :: Python :: 3.4', | ||
| 'Programming Language :: Python :: 3.5', | ||
| 'Programming Language :: Python :: 3.6', |
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.
Didn't support 3.7 and 3.8?
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 was using the what the boilerplate from azdev provided, will update.
src/ai-examples/setup.py
Outdated
| 'Programming Language :: Python :: 2', | ||
| 'Programming Language :: Python :: 2.7', | ||
| 'Programming Language :: Python :: 3', | ||
| 'Programming Language :: Python :: 3.4', |
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.
3.4 is not supported at azure-cli-core
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 was using the what the boilerplate from azdev provided, will update.
|
I've pushed an update that address some of the comments. The sha has not been updated yet, because I'm still waiting for an answer from @Juliehzl about how to properly set the |
|
@Juliehzl please help with the above comment. |
|
@Juliehzl and @yonzhan, I'm still waiting on an answer on how I'm suppose to publish the extension. If the CLI team is supposed to supply the URL, does that also mean the CLI team will upload the extension to their own blob storage? In that case is the PR done and y'all take care of the rest? If not, am I supposed to continue publishing the extention to our own blob storage using |
|
Hi @mirdaki, when the code is ready to merge, I can help you publish the extension if you want to store your extension wheel in cli storage account. |
|
@Juliehzl I've updated |
|
@haroldrandom and @Juliehzl, I've switched the |
This is a new extension (in preview) to use the Aladdin service to power all examples in help content. It is pending on this PR being merged into the core CLI to work properly.
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions: