-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Lite wheel optimization #7855
Merged
Merged
Lite wheel optimization #7855
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
54ea895
Add `pull_request.branches.main` as a trigger of the `publish` workflow
whitphx aa0062e
[WIP] Comment out the publish steps
whitphx 2e499bd
Package and upload the NPM package for debug
whitphx 0a1d588
Skip the copy_frontend.py hook in the Lite build
whitphx 9d3dcaa
add changeset
gradio-pr-bot ddc5675
[WIP] Show gradio files
whitphx 0edd7ed
[WIP] Show gradio files
whitphx bddcb96
Comment out installing the gradio and gradio_client libraries
whitphx 8bf58cd
Restore installing gradio_client because it's used by `python js/_web…
whitphx aaa5b95
Restore installing gradio because it's used by `python js/_website/ge…
whitphx 8a1d74a
Add code
freddyaboulton e204ec3
Revert "[WIP] Show gradio files"
whitphx a3999ae
Build the gradio wheel with the custom lite target
whitphx cedeac0
add changeset
gradio-pr-bot 24f3afd
Revert "[WIP] Show gradio files"
whitphx 00df92c
Revert "Skip the copy_frontend.py hook in the Lite build"
whitphx fca5ac0
Update .github/actions/install-frontend-deps/action.yml for hatch ins…
whitphx ab30b21
[WIP] Fix test-functional.yml and .github/actions/install-all-deps/ac…
whitphx 8475f6c
Revert "[WIP] Fix test-functional.yml and .github/actions/install-all…
whitphx f34eedb
Comment-in lines in publish.yml
whitphx b6355cc
Move Lite build from publish.yml to deploy-spaces.yml
whitphx 70923dc
Use the build_lite option of install-all-deps instead of running the …
whitphx b9cfd77
[TMP] Change the branch of action files
whitphx d45985d
Fix the hatch Lite build setting
whitphx 1713eef
Return pnpm pack to deploy-space
whitphx 1a0295f
Revert "[TMP] Change the branch of action files"
whitphx cb336d7
Remove dependencies for lite build
whitphx 33e03cd
[TMP] Change the branch of action files
whitphx f509e3c
Revert "Remove dependencies for lite build"
whitphx 353c8b5
Install packaging>=23.2
whitphx 5371473
[TMP] Show packaging version
whitphx c7c8e52
Fix pip install
whitphx 254a4dc
Fix
whitphx 24296a9
Uninstall packaging once
whitphx fd9f834
Use `pip install -U` instead of uninstalling the exiting version
whitphx 3f6156e
Revert "[TMP] Show packaging version"
whitphx aa08814
Add `-U` flag
whitphx 128e63e
Set packaging version as >=23.2
whitphx 0d588c8
Revert the changes on pip install
whitphx bd35f95
Set packaging version as >=23.2 in requirements.txt
whitphx ef514d5
Revert "Set packaging version as >=23.2"
whitphx c6f9c08
Fix hook name
whitphx 9066f0f
Revert "Set packaging version as >=23.2 in requirements.txt"
whitphx 9b3fa04
Revert "Revert the changes on pip install"
whitphx 61a4fc3
Add comments
whitphx de49e37
Revert "[TMP] Change the branch of action files"
whitphx 59fa334
Revert the trigger of .github/workflows/deploy-spaces.yml
whitphx 43f9e88
Remove unused `node_auth_token` and `npm_token` inputs from the `inst…
whitphx 6cea830
[TMP] Trigger CI based on this PR
whitphx 4a4f18d
Remove packging installation
whitphx 858c603
Revert "Remove packging installation"
whitphx ea119f1
Revert "[TMP] Trigger CI based on this PR"
whitphx 22b3e8f
Merge branch 'main' into lite-wheel-contents-optimization
whitphx d1c006e
Add hatch installation to the pybuild command
whitphx a20eed7
Revert "Add hatch installation to the pybuild command"
whitphx 08fcbd6
Merge branch 'main' into lite-wheel-contents-optimization
whitphx ab1954a
Remove 'skip_build: true' from the install-all-deps action in the dep…
whitphx c812b12
[TMP] Trigger CI based on this PR
whitphx 3f9c2a6
Remove 'Install Python', 'Install pnpm', and setup-node steps from de…
whitphx 711a442
Revert "[TMP] Trigger CI based on this PR"
whitphx 8e8adcc
Update pybuild:gradio command temporarily to make the functional test…
whitphx File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@gradio/app": minor | ||
"gradio": minor | ||
--- | ||
|
||
feat:Lite wheel optimization |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[build-system] | ||
requires = ["hatchling",] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "lite-builder" | ||
description = "Python library for easily interacting with trained machine learning models" | ||
license = "Apache-2.0" | ||
version = "0.0.2" | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{ name = "Abubakar Abid", email = "gradio-team@huggingface.co" }, | ||
{ name = "Ali Abid", email = "gradio-team@huggingface.co" }, | ||
{ name = "Ali Abdalla", email = "gradio-team@huggingface.co" }, | ||
{ name = "Dawood Khan", email = "gradio-team@huggingface.co" }, | ||
{ name = "Ahsen Khaliq", email = "gradio-team@huggingface.co" }, | ||
{ name = "Pete Allen", email = "gradio-team@huggingface.co" }, | ||
{ name = "Ömer Faruk Özdemir", email = "gradio-team@huggingface.co" }, | ||
{ name = "Freddy A Boulton", email = "gradio-team@huggingface.co" }, | ||
{ name = "Hannah Blair", email = "gradio-team@huggingface.co" }, | ||
] | ||
keywords = ["machine learning", "reproducibility", "visualization"] | ||
|
||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
] | ||
|
||
[tool.hatch.build] | ||
sources = ["src"] | ||
only-packages = true | ||
|
||
[project.entry-points.hatch] | ||
lite_builder = "lite_builder.hooks" |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from hatchling.builders.wheel import WheelBuilder | ||
|
||
|
||
class LiteBuilder(WheelBuilder): | ||
PLUGIN_NAME = 'lite' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from hatchling.plugin import hookimpl | ||
from .builder import LiteBuilder | ||
|
||
@hookimpl | ||
def hatch_register_builder(): | ||
return LiteBuilder |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.eggs/ | ||
gradio.egg-info | ||
dist/ | ||
dist-lite/ | ||
*.pyc | ||
__pycache__/ | ||
*.py[cod] | ||
|
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
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
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
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.
node_auth_token
andnpm_token
get passed in theinstall-all-deps
action. We would need to remove them there too.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.
Oops missed them, thanks!