forked from gradio-app/gradio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lite wheel optimization (gradio-app#7855)
* Add `pull_request.branches.main` as a trigger of the `publish` workflow * [WIP] Comment out the publish steps * Package and upload the NPM package for debug * Skip the copy_frontend.py hook in the Lite build * add changeset * [WIP] Show gradio files * [WIP] Show gradio files * Comment out installing the gradio and gradio_client libraries * Restore installing gradio_client because it's used by `python js/_website/generate_jsons/generate.py` that follows * Restore installing gradio because it's used by `python js/_website/generate_jsons/generate.py` that follows * Add code * Revert "[WIP] Show gradio files" This reverts commit e15fef2. * Build the gradio wheel with the custom lite target * add changeset * Revert "[WIP] Show gradio files" This reverts commit aef053f. * Revert "Skip the copy_frontend.py hook in the Lite build" This reverts commit ca296d0. * Update .github/actions/install-frontend-deps/action.yml for hatch installation * [WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch * Revert "[WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch" This reverts commit 571823b. * Comment-in lines in publish.yml * Move Lite build from publish.yml to deploy-spaces.yml * Use the build_lite option of install-all-deps instead of running the build command * [TMP] Change the branch of action files * Fix the hatch Lite build setting * Return pnpm pack to deploy-space * Revert "[TMP] Change the branch of action files" This reverts commit fe4e1c8. * Remove dependencies for lite build * [TMP] Change the branch of action files * Revert "Remove dependencies for lite build" This reverts commit 856a858. * Install packaging>=23.2 * [TMP] Show packaging version * Fix pip install * Fix * Uninstall packaging once * Use `pip install -U` instead of uninstalling the exiting version * Revert "[TMP] Show packaging version" This reverts commit 910b6bb. * Add `-U` flag * Set packaging version as >=23.2 * Revert the changes on pip install * Set packaging version as >=23.2 in requirements.txt * Revert "Set packaging version as >=23.2" This reverts commit 8aa77c8. * Fix hook name * Revert "Set packaging version as >=23.2 in requirements.txt" This reverts commit fbd605c. * Revert "Revert the changes on pip install" This reverts commit 81ff38a. * Add comments * Revert "[TMP] Change the branch of action files" This reverts commit 0d6aa48. * Revert the trigger of .github/workflows/deploy-spaces.yml * Remove unused `node_auth_token` and `npm_token` inputs from the `install-all-deps` action * [TMP] Trigger CI based on this PR * Remove packging installation * Revert "Remove packging installation" This reverts commit 4a4f18d. * Revert "[TMP] Trigger CI based on this PR" This reverts commit 6cea830. --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
- Loading branch information
1 parent
989fe25
commit 611c927
Showing
13 changed files
with
92 additions
and
55 deletions.
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