-
Notifications
You must be signed in to change notification settings - Fork 81
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
Merge GradioNotebook into main aiconfig repo as an extension #1237
Conversation
Lots of moving pieces. Had to do some minor updates like updating README.md and README-dev.md but these aren't blockers. I also updated the HF extension, aiconfig editor client package, Gradio client, and gradio requirements.txt + pyproject itself ## Test Plan Go to `GradioNotebook/frontend` and run ``` yarn && yarn dev ``` <img width="1920" alt="Screenshot 2024-02-13 at 22 54 16" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/ccc8dacf-f5e4-4635-9818-63b13f199d3c">
@@ -0,0 +1,52 @@ | |||
## If running for the FIRST TIME and building on this | |||
|
|||
Otherwise, go directly to [dev instructions](https://github.com/lastmile-ai/gradio-workbook/blob/main/gradioworkbook/README-dev.md#follow-these-steps-if-you-are-developing-locally) |
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.
nit, should update this link
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.
update to where?
- force `python` to be symlinked to `python3` ([instructions](https://stackoverflow.com/a/71957847)) | ||
4. Run the command `gradio cc create Notebook --overwrite`. This will install the necessary setups and dependencies | ||
5. `cd .. && rm -rf gradio-notebook` | ||
6. Clone the repo again: `git clone https://github.com/lastmile-ai/gradio-workbook.git` (with Sapling: `sl clone https://github.com/lastmile-ai/gradio-workbook.git`) |
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 guess this isn't relevant now, right?
```bash | ||
cd GradioNotebook | ||
pip install -r requirements.txt | ||
cd frontend && yarn dev |
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.
nit, will need to run yarn especially for first time to ensure packages are installed
cd frontend && yarn dev | |
cd frontend && yarn && yarn dev |
2. HuggingFace extension: `aiconfig/extensions/HuggingFace` | ||
3. main python package: `python-aiconfig` | ||
4. GradioNotebook client: cd `GradioNotebook/frontend` | ||
- update `frontend/package` for `@lasmile/aiconfig-editor` |
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.
- update `frontend/package` for `@lasmile/aiconfig-editor` | |
- `update `frontend/package.json` for `@lastmile/aiconfig-editor`, `yarn` && `yarn build` |
3. main python package: `python-aiconfig` | ||
4. GradioNotebook client: cd `GradioNotebook/frontend` | ||
- update `frontend/package` for `@lasmile/aiconfig-editor` | ||
5. GradioNotebook pypi: cd `GradioNotebook` |
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.
Also need gradio cc build --no-build-frontend
after building the client
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.
not necessarily here, but pretty sure we can remove this
// pass dark or light override | ||
const themeMode = props.themeMode === "system" ? undefined : props.themeMode; | ||
|
||
const theme = useMemo( |
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.
Ah, note to self -- we should be able to remove this theme stuff here now that it's updated in GradioTheme to have proper specificity.
To be done in a later PR
"@gradio/client": "^0.10.1", | ||
"@gradio/statustracker": "0.4.0", | ||
"@gradio/utils": "0.2.0", | ||
"@lastmileai/aiconfig-editor": "^0.1.26", |
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.
Just a reminder to ensure this matches the version in the gradio workbook repo if we bump again
@@ -0,0 +1,82 @@ | |||
/* |
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.
Also self-reminder, we can probably get rid of most of this with updated GradioTheme as well
Mostly nits / notes but also a few changes we should make to the README before landing / forgetting |
When I tried to publish from the mono-repo it caused 0.0.9 to break, so I'm a bit concerned and for now going to put this off into draft mode |
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.
It shouldn't be under extensions. extensions are for extensions to the core aiconfig library, like model parsers and eventually callback handlers.
This should be a root folder, similar to vscode-extension
. Maybe call it gradio-notebook
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'm personally more in favour of having it as an extension, because this has the gradio
package as a dependency which I'm assuming will be very large (when counting all it's sub-dependencies)
1. cp -r gradioworkbook ../aiconfig/gradio-notebook similar to #1237 ## Testplan 1. cd frontend -> yarn 2. gradio cc build --no-build-frontend 3. change pyproject.toml package name to gradio-gradioworkbook-ap for testing purposes. This is a pypi package used for testing. Test space: https://huggingface.co/spaces/Ankush-LM/testwilldelete5
finished and validated in #1242 |
Merge GradioNotebook into main aiconfig repo as an extension
Lots of moving pieces. Had to do some minor updates like updating README.md and README-dev.md but these aren't blockers. I also updated the HF extension, aiconfig editor client package, Gradio client, and gradio requirements.txt + pyproject itself
Test Plan
Go to
GradioNotebook/frontend
and run