Skip to content

feat: unify local and Cloud Run deployment, merge demo improvements#25

Merged
AhmedRadwan02 merged 127 commits into
mainfrom
unbias-pretrained
May 26, 2026
Merged

feat: unify local and Cloud Run deployment, merge demo improvements#25
AhmedRadwan02 merged 127 commits into
mainfrom
unbias-pretrained

Conversation

@AhmedRadwan02
Copy link
Copy Markdown
Collaborator

Summary
Unifies local and Cloud Run deployment into a single branch. Replaces the separate deploy branch.

Type of Change

  • ✨ New feature
  • 🔧 Refactoring

Changes Made

  • api.py — unified vLLM + local transformer modes via VLLM_BASE_URL env var
  • script.js — added file upload, copy button, cold-start retry logic, 5000 char limit
  • Added Cloud Run deployment infrastructure (Dockerfile, nginx.conf, entrypoint.sh, deploy-demo.yml)
  • Bumped uv to 0.10.12 across all workflows
  • Fixed pyproject.toml to omit train extra from default lockfile resolution

Testing

  • Tests pass locally
  • Type checking passes
  • Linting passes
  • Manual testing performed — local transformer mode verified working

Deployment Notes
Set VLLM_BASE_URL env var to switch to Cloud Run vLLM mode. Without it, runs local transformer as before.

AhmedRadwan02 and others added 30 commits March 3, 2026 12:54
* Changing model Doctest example

* caching pre-commit env

* Ignoring pyarrow version vuln

* Updating Serve website and Model Path

* Updating schema

* Updating pre-commit
…emove 4bit auto-override, fix contained segments
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Adds a `cache-model` job that runs Cloud Build to download the model
from HuggingFace to local disk and uploads blobs + GCS FUSE symlink
objects directly — bypassing GCS FUSE append-mode writes, which caused
the startup probe to fail on the SFT-Instruct revision.

`deploy-vllm` now gates on both `build-vllm` and `cache-model`,
ensuring weights are present before the Cloud Run revision is created.
The cache step is a no-op when large blobs already exist in GCS.
aravind-3105 and others added 16 commits May 8, 2026 10:28
The path filter limited code_checks to .py / .ipynb / lockfile / config
changes, so PRs touching only docs, templates, CSS, or assets bypassed
pre-commit entirely. Remove the filter so every push and PR runs the
full hook suite — pre-commit's per-hook scoping already handles which
files each hook touches.
This commit introduces a new `training` directory containing scripts for fine-tuning the Qwen3 model for bias detection, including `train_sft.py` and `train_grpo.py`. It also adds a `sanity_check.py` script for testing model inference, along with a README for usage instructions. New tests for the training scripts are included in the `tests/training` directory, ensuring coverage for the functionality. Additionally, the `pyproject.toml` file is updated to include the new test paths.
… scripts and update mypy configuration

This commit cleans up the training scripts by removing unnecessary type ignore comments for imports that are now resolved. Additionally, the `pyproject.toml` file is updated to include a new mypy path and overrides for handling heavy GPU/training-only dependencies, ensuring better type checking across environments.
This commit adds a new section to the main README outlining the training process for the Qwen3-8B model, including details on the fine-tuning stages and dependencies. Additionally, the training README is updated to include information about the dataset used, its schema, and instructions for preparing the data for training.
…e/unbias-plus into unbias-pretrained-update

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
…on to 3.8.1 for security advisory compliance, and update transformers version constraint to <6.0.0. Adjust unsloth tag to March-2026 in uv.lock.
aravind-3105 and others added 12 commits May 20, 2026 10:52
…e/unbias-plus into unbias-pretrained-update

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Replace blob-count heuristic with a git ls-remote / refs/main SHA
comparison so stale weights are detected and cleared automatically.
Also fixes a tr '/' '--' bug that produced single-dash paths instead
of the double-dash format used by the HuggingFace cache layout.
- Bump setup-uv to v8.1.0 across all workflows (from main)
- Keep CVE/PYSEC ignore list from unbias-pretrained (with justification comments)
- Regenerate uv.lock from merged pyproject.toml
@AhmedRadwan02 AhmedRadwan02 merged commit 626f908 into main May 26, 2026
16 checks passed
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.

6 participants