-
Notifications
You must be signed in to change notification settings - Fork 70
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
Share Button [3/n]: Upload AIConfig file to S3 #1037
Closed
Conversation
This file contains 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
Doesn't do anything when you click it now, but just setting up the UI and tooltip. Will add upload feature next PR ## Test Plan Run these commands from the `aiconfig` dir: ```bash aiconfig_path =./cookbooks/Gradio/huggingface.aiconfig.json parsers_path=./cookbooks/Gradio/hf_model_parsers.py aiconfig edit --aiconfig-path=$aiconfig_path --server-port=8080 --server-mode=debug_servers --parsers-module-path=$parsers_path ``` <img width="1512" alt="Screenshot 2024-01-25 at 15 58 42" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/6f414df7-dcf3-4b58-beed-c4fc3f7c2968">
Doing this makes it easier to manage rather than gating each one individually ## Test Plan No functional changes ReadOnly mode <img width="1512" alt="Screenshot 2024-01-25 at 16 03 30" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/3493b525-e943-46fe-805d-3424af206bae"> Regular mode (with share button shown) <img width="1512" alt="Screenshot 2024-01-25 at 16 04 06" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/fc7a86c2-8efb-4190-afe9-870a15e93f46">
Going to re-use this next PR for uploading AIConfig files to S3 ## Test Plan No functional changes, make sure that uploading files still works for ASR and Image 2 text Go to `aiconfig/python/src/aiconfig/editor/client` and run this command: ``` rm -rf node_modules && yarn && yarn build ``` Then go to `aiconfig` dir and run this command: ``` aiconfig_path =./cookbooks/Gradio/huggingface.aiconfig.json parsers_path=./cookbooks/Gradio/hf_model_parsers.py aiconfig edit --aiconfig-path=$aiconfig_path --server-port=8080 --server-mode=debug_servers --parsers-module-path=$parsers_path ``` https://github.com/lastmile-ai/aiconfig/assets/151060367/7a5141f1-bb1b-496c-b039-724a8eeb11dd
This was referenced Jan 26, 2024
The first part of the share functionality is uploading it to S3. Next PR going to pass in this S3 link into the `api/aiconfig/upload` path, and the PR after that will create a UI dialog on return that displays the URI. I also created a helper function `convertClientAIConfigToAIConfig` to get the AIConfig format without the client `_ui` fields ## Test Plan Check that the S3 loads when you click the button Go to `aiconfig/python/src/aiconfig/editor/client` and run this command: ``` rm -rf node_modules && yarn && yarn build ``` Then go to `aiconfig` dir and run this command: ``` aiconfig_path =./cookbooks/Gradio/huggingface.aiconfig.json parsers_path=./cookbooks/Gradio/hf_model_parsers.py aiconfig edit --aiconfig-path=$aiconfig_path --server-port=8080 --server-mode=debug_servers --parsers-module-path=$parsers_path ``` https://github.com/lastmile-ai/aiconfig/assets/151060367/e63b73f0-845f-446f-9c6b-4d3e737dec29
rossdanlm
added a commit
that referenced
this pull request
Jan 26, 2024
Share button [1/n]: Create button UI Doesn't do anything when you click it now, but just setting up the UI and tooltip. Will add upload feature next PR ## Test Plan Run these commands from the `aiconfig` dir: ```bash aiconfig_path =./cookbooks/Gradio/huggingface.aiconfig.json parsers_path=./cookbooks/Gradio/hf_model_parsers.py aiconfig edit --aiconfig-path=$aiconfig_path --server-port=8080 --server-mode=debug_servers --parsers-module-path=$parsers_path ``` <img width="1512" alt="Screenshot 2024-01-25 at 15 58 42" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/6f414df7-dcf3-4b58-beed-c4fc3f7c2968"> --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1031). * #1037 * #1035 * #1032 * __->__ #1031
rossdanlm
added a commit
that referenced
this pull request
Jan 26, 2024
…#1032) Move !readOnly check to entire header grouping at top for all buttons Doing this makes it easier to manage rather than gating each one individually ## Test Plan No functional changes ReadOnly mode <img width="1512" alt="Screenshot 2024-01-25 at 16 03 30" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/3493b525-e943-46fe-805d-3424af206bae"> Regular mode (with share button shown) <img width="1512" alt="Screenshot 2024-01-25 at 16 04 06" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/fc7a86c2-8efb-4190-afe9-870a15e93f46"> --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1032). * #1037 * #1035 * __->__ #1032 * #1031
rholinshead
reviewed
Jan 26, 2024
@@ -47,3 +47,21 @@ export function getModelSettingsStream( | |||
|
|||
return undefined; | |||
} | |||
|
|||
export function convertClientAIConfigToAIConfig( |
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.
We already have this as clientConfigToAIConfig
in the types (just have it colocated with the definitions of ClientAIConfig, etc.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Share Button [3/n]: Upload AIConfig file to S3
The first part of the share functionality is uploading it to S3. Next PR going to pass in this S3 link into the
api/aiconfig/upload
path, and the PR after that will create a UI dialog on return that displays the URI.I also created a helper function
convertClientAIConfigToAIConfig
to get the AIConfig format without the client_ui
fieldsTest Plan
Check that the S3 loads when you click the button
Go to
aiconfig/python/src/aiconfig/editor/client
and run this command:Then go to
aiconfig
dir and run this command:0279c795-b83e-4a9a-9b93-e0c4b6522cbf.mp4
Stack created with Sapling. Best reviewed with ReviewStack.