Skip to content

feat: replace deploy_space.py with huggingface-cli upload#23

Merged
JacobPEvans-personal merged 1 commit into
mainfrom
feat/v05-script-reduction
Apr 26, 2026
Merged

feat: replace deploy_space.py with huggingface-cli upload#23
JacobPEvans-personal merged 1 commit into
mainfrom
feat/v05-script-reduction

Conversation

@JacobPEvans-personal
Copy link
Copy Markdown
Member

Summary

  • Drops scripts/deploy_space.py (67 LOC of custom HF API code)
  • Replaces python scripts/deploy_space.py step in deploy-space.yml with huggingface-cli upload
  • Bumps huggingface_hub pin from >=0.23 to >=0.30 (needed for [cli] extra)
  • Removes the job-level COMMIT_SHA env var (was only consumed by the deleted script)

The huggingface-cli upload subcommand handles atomic space uploads natively.
GIT_SHA is passed via an env: key so no GitHub context expression leaks into the shell.

Test plan

Note: the current 403 failures are a token-permissions issue (the HF_TOKEN in
the huggingface-space environment needs Space write scope). The script swap does
not change the token requirements — both the old and new paths use the same API.
Regenerate the HF_TOKEN with write access to JacobPEvans/mlx-benchmarks-viewer
if the 403 persists after this merges.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 26, 2026 19:38
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new knowledge and instruction-following suite configuration, updates the project layout, and modifies dependency versions. The reviewer identified that the deletion of the schema validation script might be accidental, potentially leading to a loss of CI coverage. Additionally, a likely typo in the pyarrow version requirement in the pre-commit configuration was flagged for correction.

I am having trouble creating individual review comments. Click here to see my feedback.

scripts/validate_schema.py (1-72)

high

The removal of scripts/validate_schema.py is not mentioned in the PR summary and seems potentially accidental. This script is responsible for validating the project's JSON schema and TOML configurations. Removing it without a replacement in the CI workflow will result in a loss of validation coverage. If this was intentional, please clarify the new validation method; otherwise, this file should be restored.

.pre-commit-config.yaml (38)

medium

The version pyarrow>=23 appears to be a typo. Please verify the correct version, as suggestions regarding 'latest' or 'valid' versions may be based on stale data. If this is incorrect, please update it to a valid version (e.g., 19) or check if huggingface_hub was intended instead, as mentioned in the PR description.

          - pyarrow>=19
References
  1. Verify automated suggestions about 'latest' or 'valid' dependency versions, as the tool's data may be stale.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s Hugging Face Space deployment flow to use huggingface-cli upload instead of a custom Python script, and adjusts related CI/configuration to match the new approach.

Changes:

  • Replace the deploy-space workflow’s python scripts/deploy_space.py step with huggingface-cli upload and remove the now-unneeded deploy script.
  • Remove scripts/validate_schema.py and inline schema/TOML validation directly into ci-gate.yml.
  • Add a new lm-eval suite config (configs/lm-eval/knowledge.toml) and update layout docs; tweak a mypy ignore for pyarrow stubs.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/mlx_benchmarks/publish.py Adjusts mypy ignore to be resilient to future stub improvements.
scripts/validate_schema.py Removes standalone schema/TOML validation script.
scripts/deploy_space.py Removes custom HF Space deploy script (replaced by CLI).
configs/lm-eval/knowledge.toml Adds a new lm-eval “knowledge” suite config (MMLU + IFEval).
configs/LAYOUT.md Documents the new config and updates “planned” list.
.pre-commit-config.yaml Updates mypy hook dependencies (but currently introduces an invalid pyarrow pin).
.github/workflows/deploy-space.yml Switches deployment to huggingface-cli upload with excludes and commit message.
.github/workflows/ci-gate.yml Replaces validator script call with inline Python one-liners for schema/TOML validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/deploy-space.yml
Comment thread .github/workflows/ci-gate.yml
Comment thread .github/workflows/ci-gate.yml Outdated
Comment thread .github/workflows/ci-gate.yml Outdated
Drops 67 LOC of custom HF API code. The huggingface-cli upload subcommand
(huggingface_hub>=0.30) handles the space upload natively with the same
exclude semantics, no bespoke commit-building needed.

(claude)
@JacobPEvans-personal JacobPEvans-personal force-pushed the feat/v05-script-reduction branch from da461b1 to 2ab77c7 Compare April 26, 2026 21:35
@JacobPEvans-personal JacobPEvans-personal merged commit 8764aa8 into main Apr 26, 2026
13 checks passed
@JacobPEvans-personal JacobPEvans-personal deleted the feat/v05-script-reduction branch April 26, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants