Skip to content

Check deployed models and upload local model#55

Open
uelkerd wants to merge 28 commits into
mainfrom
cursor/check-deployed-models-and-upload-local-model-e3c6
Open

Check deployed models and upload local model#55
uelkerd wants to merge 28 commits into
mainfrom
cursor/check-deployed-models-and-upload-local-model-e3c6

Conversation

@uelkerd
Copy link
Copy Markdown
Owner

@uelkerd uelkerd commented Aug 10, 2025

Enable custom model deployment by adding a script to upload trained models to HuggingFace Hub and updating deployment configurations to use them.

Previously, the model-as-a-service deployment was configured to fetch models externally but was falling back to generic base models (distilroberta-base, bert-base-uncased) because the user's custom-trained models were not available on HuggingFace Hub. This PR provides a complete solution to upload these custom models and ensures the deployment uses them for improved accuracy and specialized emotion detection, prioritizing a user-specified local directory for model discovery.


Open in Cursor Open in Web

Summary by Sourcery

Enable end-to-end custom model deployment by adding a script and documentation to upload and integrate trained emotion detection models with the existing deployment pipeline

New Features:

  • Add script to find, convert, and upload custom-trained emotion detection models to HuggingFace Hub
  • Introduce automated deployment config updates to point to uploaded custom models

Bug Fixes:

  • Fix model-as-a-service fallback to generic base models by ensuring custom models are uploaded and used

Enhancements:

  • Support loading of 12 specialized emotion labels in deployment
  • Generate model cards, requirements, and handle PyTorch to HuggingFace format conversion automatically

Deployment:

  • Switch deployment infrastructure to pull custom models from HuggingFace Hub instead of local base models

Documentation:

  • Add comprehensive custom model deployment guide
  • Add README for deployment/models directory outlining expected model structure

Summary by CodeRabbit

  • New Features

    • Introduced an automated script for uploading custom-trained emotion detection models to the HuggingFace Hub, streamlining production deployment.
    • Deployment pipeline now supports direct loading of custom models from HuggingFace Hub and automates model conversion, configuration updates, and model card generation.
    • Added a flexible API server supporting serverless, endpoint, and self-hosted deployment modes with unified emotion detection responses.
  • Documentation

    • Added a comprehensive deployment guide detailing steps for uploading, configuring, and deploying custom emotion detection models.
    • Included a new README for the models directory, clarifying model management and deployment procedures.
    • Added a detailed deployment checklist for HuggingFace models covering preparation, testing, security, and troubleshooting.
    • Provided example environment configuration files and improvement summaries for deployment scripts.
    • Added multiple detailed code review and security fix documents addressing authentication, error handling, secure server binding, and best practices.
    • Updated changelog with details about the new deployment solution, model improvements, and production changes.
  • Bug Fixes

    • Fixed an issue where deployment defaulted to untrained base models instead of intended custom-trained models.
    • Resolved a critical bug preventing safe handling of empty model parameters in the API server.
  • Chores

    • Updated ignore rules to ensure the models directory README is tracked.
    • Applied code style fixes to eliminate unused variable warnings across deployment scripts.

Loading
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.

3 participants