-
Notifications
You must be signed in to change notification settings - Fork 80
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
Mock shareCallback to test UI on AIConfigEditor #1045
Draft
rossdanlm
wants to merge
2
commits into
main
Choose a base branch
from
pr1045
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
rossdanlm
pushed a commit
that referenced
this pull request
Jan 26, 2024
Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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/0c177c59-54b8-4d04-adfa-aea6d78f5f07 https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720 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 ```
rossdanlm
pushed a commit
that referenced
this pull request
Jan 26, 2024
Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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 ``` No Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/0c177c59-54b8-4d04-adfa-aea6d78f5f07 Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720
rossdanlm
pushed a commit
that referenced
this pull request
Jan 26, 2024
Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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 ``` No Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/0c177c59-54b8-4d04-adfa-aea6d78f5f07 Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720
rossdanlm
pushed a commit
that referenced
this pull request
Jan 26, 2024
Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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 ``` No Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/0c177c59-54b8-4d04-adfa-aea6d78f5f07 Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720
rossdanlm
pushed a commit
that referenced
this pull request
Jan 26, 2024
Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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 ``` No Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/0c177c59-54b8-4d04-adfa-aea6d78f5f07 Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720
rossdanlm
pushed a commit
that referenced
this pull request
Jan 26, 2024
Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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 ``` No Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/0c177c59-54b8-4d04-adfa-aea6d78f5f07 Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720
rossdanlm
pushed a commit
that referenced
this pull request
Jan 26, 2024
Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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 ``` No Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1e9f4b90-a9e9-4c60-a813-afa2a46a1b5a Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720
rossdanlm
added a commit
that referenced
this pull request
Jan 26, 2024
Share Button [7/n]: Display loading UI Created a separate component for the shareButton to manage the `isLoading` state and show that in the UI ## Test Plan Rebase on then do: #1045 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 ``` No Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1e9f4b90-a9e9-4c60-a813-afa2a46a1b5a Error Testing https://github.com/lastmile-ai/aiconfig/assets/151060367/1abcce37-8ba4-4513-b826-ea0f9d7bb720 --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1044). * #1045 * #1049 * __->__ #1044
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button ## Test Plan Rebase onto #1045 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 ```
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button ## Test Plan Rebase onto #1045 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 ```
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button ## Test Plan Rebase onto #1045 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/123319cf-2e92-49e8-8f93-2d930a3b0ac7
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button ## Test Plan Rebase onto #1045 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/123319cf-2e92-49e8-8f93-2d930a3b0ac7
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button ## Test Plan Rebase onto #1045 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/123319cf-2e92-49e8-8f93-2d930a3b0ac7
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button. I'm making the signature of the callback take in an AIConfig object parameter, because we have function `clientConfigToAIConfig` within the editor pacakge: https://github.com/lastmile-ai/aiconfig/blob/c838856f36941b0796c8f12edcf846cc18ebdaa1/python/src/aiconfig/editor/client/src/shared/types.ts#L37 ## Test Plan Rebase onto #1045 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/123319cf-2e92-49e8-8f93-2d930a3b0ac7
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button. I'm making the signature of the callback take in an AIConfig object parameter, because we have function `clientConfigToAIConfig` within the editor pacakge: https://github.com/lastmile-ai/aiconfig/blob/c838856f36941b0796c8f12edcf846cc18ebdaa1/python/src/aiconfig/editor/client/src/shared/types.ts#L37 ## Test Plan Rebase onto #1045 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/123319cf-2e92-49e8-8f93-2d930a3b0ac7
rossdanlm
pushed a commit
that referenced
this pull request
Jan 29, 2024
If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button. I'm making the signature of the callback take in an AIConfig object parameter, because we have function `clientConfigToAIConfig` within the editor pacakge: https://github.com/lastmile-ai/aiconfig/blob/c838856f36941b0796c8f12edcf846cc18ebdaa1/python/src/aiconfig/editor/client/src/shared/types.ts#L37 ## Test Plan Rebase onto #1045 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/123319cf-2e92-49e8-8f93-2d930a3b0ac7
rossdanlm
added a commit
that referenced
this pull request
Jan 29, 2024
Download Button [1/n]: Setup UI on the editor client If the download callback is defined (not for local editor or VSCode, but will be for Gradio), then we display it and use the loading state to disable you from clicking on the button. I'm making the signature of the callback take in an AIConfig object parameter, because we have function `clientConfigToAIConfig` within the editor pacakge: https://github.com/lastmile-ai/aiconfig/blob/c838856f36941b0796c8f12edcf846cc18ebdaa1/python/src/aiconfig/editor/client/src/shared/types.ts#L37 ## Test Plan Rebase onto #1045 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/123319cf-2e92-49e8-8f93-2d930a3b0ac7
rossdanlm
pushed a commit
that referenced
this pull request
Jan 30, 2024
I realized that after I moved `readOnly` check on entire group in #1032, I need to be able to still have the Download button for read-only mode so user can still download the AIConfig. We just need to make sure to define this endpoint in the lastMile repo ## Test Plan Rebase onto #1045 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 ``` readOnly is true readOnly is false
I realized that after I moved `readOnly` check on entire group in #1032, I need to be able to still have the Download button for read-only mode so user can still download the AIConfig. We just need to make sure to define this endpoint in the lastMile repo ## Test Plan Rebase onto #1045 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 ``` readOnly is true <img width="1920" alt="Screenshot 2024-01-30 at 00 45 03" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/356cd898-e3f2-430c-8153-a464b78a254b"> readOnly is false <img width="1920" alt="Screenshot 2024-01-30 at 00 44 36" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/d14ec7ee-8a10-49f1-b9d8-d4a5a2153b99">
TSIA, just adding code so we can mock the UI
rossdanlm
pushed a commit
that referenced
this pull request
Jan 30, 2024
I realized that after I moved `readOnly` check on entire group in #1032, I need to be able to still have the Download button for read-only mode so user can still download the AIConfig. We just need to make sure to define this endpoint in the lastMile repo ## Test Plan Rebase onto #1045 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 ``` readOnly is true <img width="1920" alt="Screenshot 2024-01-30 at 00 45 03" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/356cd898-e3f2-430c-8153-a464b78a254b"> readOnly is false <img width="1920" alt="Screenshot 2024-01-30 at 00 44 36" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/d14ec7ee-8a10-49f1-b9d8-d4a5a2153b99">
rossdanlm
added a commit
that referenced
this pull request
Jan 30, 2024
Download Button [4/n]: Make this enabled for read-only mode I realized that after I moved `readOnly` check on entire group in #1032, I need to be able to still have the Download button for read-only mode so user can still download the AIConfig. We just need to make sure to define this endpoint in the lastMile repo ## Test Plan Rebase onto #1045 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 ``` readOnly is true <img width="1920" alt="Screenshot 2024-01-30 at 00 45 03" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/356cd898-e3f2-430c-8153-a464b78a254b"> readOnly is false <img width="1920" alt="Screenshot 2024-01-30 at 00 44 36" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/d14ec7ee-8a10-49f1-b9d8-d4a5a2153b99">
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.
Mock shareCallback to test UI on AIConfigEditor
TSIA, just adding code so we can mock the UI
Stack created with Sapling. Best reviewed with ReviewStack.