-
Notifications
You must be signed in to change notification settings - Fork 0
Check deployed models and upload local model #55
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
Open
d-ulker
wants to merge
28
commits into
main
Choose a base branch
from
cursor/check-deployed-models-and-upload-local-model-e3c6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
9d72863
Add custom model deployment solution for HuggingFace Hub integration
cursoragent 3915103
Update model search path to use designated models directory
cursoragent 4bed501
Add models directory README with .gitignore exception
cursoragent 6723b0c
Check deployed models and upload local model
deepsource-autofix[bot] 295fa3d
Complete HuggingFace deployment solution with multiple strategies
cursoragent 1a8bcc8
Apply HuggingFace deployment best practices and recommendations
cursoragent b113ab5
Make model deployment script portable across different environments
cursoragent ac82923
Add test script for portable model path detection
cursoragent 63e5eeb
Fix unused variable linting issue (PYL-W0612)
cursoragent 8bbb12d
Fix unused argument linting issue (PYL-W0613)
cursoragent ac11c40
Add validation test for model_info usage fix
cursoragent c0c054b
Comprehensive improvements to upload script robustness and portability
cursoragent 180034e
Add comprehensive improvements summary documentation
cursoragent 412c33a
Resolve merge conflict by keeping improved version
cursoragent ab0c59a
Check deployed models and upload local model
deepsource-autofix[bot] fbbb590
Address all code review comments with comprehensive fixes
cursoragent 682cbee
Add comprehensive code review response documentation
cursoragent ee4748b
Resolve merge conflict - keep all code review fixes and improvements
cursoragent 3f5bd11
Fix unguarded next() calls to resolve PTC-W0063 critical linting issue
cursoragent 2f495c1
Add comprehensive documentation for PTC-W0063 fix
cursoragent 4aa644d
Fix critical security vulnerability BAN-B104: Unsafe binding to all i…
cursoragent 5326521
Add comprehensive documentation for BAN-B104 security fix
cursoragent ca54ab6
Address all code review comments with comprehensive fixes
cursoragent 7a9436b
SECURITY: Resolve remaining BAN-B104 hardcoded binding string issues
cursoragent b21a34c
CODE QUALITY: Fix PYL-W0612 unused variable issues using Python best …
cursoragent 521d569
Check deployed models and upload local model
deepsource-autofix[bot] 554d451
Check deployed models and upload local model
deepsource-autofix[bot] 11f320f
Checkpoint before follow-up message
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,119 @@ | ||
| # Flask Security Configuration Template | ||
| # Copy this to .env and customize for your deployment environment | ||
|
|
||
| # ============================================================================= | ||
| # 🔒 SECURITY CONFIGURATION | ||
| # ============================================================================= | ||
|
|
||
| # Flask Host Binding (SECURITY CRITICAL!) | ||
| # | ||
| # DEVELOPMENT (RECOMMENDED): | ||
| FLASK_HOST=127.0.0.1 | ||
| # ✅ SECURE: Only accepts connections from localhost | ||
| # ✅ SAFE: Cannot be accessed from external networks | ||
| # ✅ IDEAL: For development, testing, and local deployment | ||
| # | ||
| # PRODUCTION (USE WITH CAUTION): | ||
| # FLASK_HOST=0.0.0.0 | ||
| # ⚠️ EXPOSED: Accepts connections from all interfaces | ||
| # ⚠️ RISK: Can be accessed from external networks | ||
| # ⚠️ REQUIRES: Proper firewall, reverse proxy, and security measures | ||
| # | ||
| # CUSTOM (ADVANCED): | ||
| # FLASK_HOST=192.168.1.100 | ||
| # 🔧 SPECIFIC: Binds to a specific network interface | ||
| # 🔧 USE CASE: When you need access from specific networks only | ||
|
|
||
| # Flask Port | ||
| FLASK_PORT=5000 | ||
| # Default: 5000 | ||
| # Change if port conflicts or you need a different port | ||
|
|
||
| # Flask Debug Mode (SECURITY CRITICAL!) | ||
| FLASK_DEBUG=False | ||
| # ✅ SECURE: Debug disabled (production default) | ||
| # ⚠️ DANGER: Never set to True in production! | ||
| # Debug mode exposes sensitive information and allows code execution | ||
|
|
||
| # ============================================================================= | ||
| # 🚀 DEPLOYMENT ENVIRONMENT EXAMPLES | ||
| # ============================================================================= | ||
|
|
||
| # LOCAL DEVELOPMENT (Most Common): | ||
| # FLASK_HOST=127.0.0.1 | ||
| # FLASK_PORT=5000 | ||
| # FLASK_DEBUG=False | ||
|
|
||
| # DOCKER CONTAINER (For external access): | ||
| # FLASK_HOST=0.0.0.0 # Required for Docker port mapping | ||
| # FLASK_PORT=5000 | ||
| # FLASK_DEBUG=False | ||
| # Note: Container should be behind reverse proxy/load balancer | ||
|
|
||
| # PRODUCTION CLOUD (Behind Load Balancer): | ||
| # FLASK_HOST=0.0.0.0 # Load balancer handles security | ||
| # FLASK_PORT=8080 # Non-standard port | ||
| # FLASK_DEBUG=False # Never True in production! | ||
|
|
||
| # KUBERNETES DEPLOYMENT: | ||
| # FLASK_HOST=0.0.0.0 # Pod networking requires this | ||
| # FLASK_PORT=5000 | ||
| # FLASK_DEBUG=False | ||
| # Note: Use NetworkPolicies and Ingress for security | ||
|
|
||
| # ============================================================================= | ||
| # 🛡️ SECURITY BEST PRACTICES | ||
| # ============================================================================= | ||
|
|
||
| # 1. DEVELOPMENT: | ||
| # - Always use 127.0.0.1 (default) | ||
| # - Keep debug=False unless actively debugging | ||
| # - Test with realistic data, not production data | ||
|
|
||
| # 2. STAGING/TESTING: | ||
| # - Use 127.0.0.1 or specific internal IPs | ||
| # - Never expose staging to public internet | ||
| # - Use VPN or internal networks for access | ||
|
|
||
| # 3. PRODUCTION: | ||
| # - Use 0.0.0.0 ONLY behind reverse proxy (nginx, Apache, etc.) | ||
| # - Always debug=False | ||
| # - Implement proper authentication and authorization | ||
| # - Use HTTPS with valid certificates | ||
| # - Set up monitoring and alerting | ||
| # - Regular security audits | ||
|
|
||
| # 4. CONTAINERIZATION: | ||
| # - Container: FLASK_HOST=0.0.0.0 (for port mapping) | ||
| # - Host: Bind only to localhost or internal networks | ||
| # - Use container orchestration security features | ||
| # - Network segmentation and policies | ||
|
|
||
| # ============================================================================= | ||
| # 🔍 SECURITY CHECKLIST | ||
| # ============================================================================= | ||
| # □ Reviewed host binding setting | ||
| # □ Confirmed debug mode is disabled for production | ||
| # □ Implemented proper authentication if exposing externally | ||
| # □ Set up reverse proxy/load balancer for external access | ||
| # □ Configured firewall rules | ||
| # □ Enabled HTTPS/TLS encryption | ||
| # □ Set up monitoring and logging | ||
| # □ Tested security configuration | ||
| # □ Documented deployment security model | ||
|
|
||
| # ============================================================================= | ||
| # 📊 MODEL DEPLOYMENT CONFIGURATION (Optional) | ||
| # ============================================================================= | ||
|
|
||
| # HuggingFace Deployment Strategy | ||
| DEPLOYMENT_TYPE=local | ||
| # Options: serverless, endpoint, local | ||
|
|
||
| # Model Configuration | ||
| MODEL_NAME=your-username/samo-dl-emotion-model | ||
| HF_TOKEN=your_hf_token_here | ||
|
|
||
| # Model Processing Settings | ||
| MAX_LENGTH=128 | ||
| BATCH_SIZE=32 |
Oops, something went wrong.
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.
💡 Verification agent
🧩 Analysis chain
Avoid duplicate “Unreleased” sections; consolidate or cut a release entry
There is already an “Unreleased - 2025-08-07” earlier (Line 5). Create one Unreleased section, or turn this new block into a dated release to maintain Keep a Changelog structure.
Option A (recommended): merge bullets into the top Unreleased section and remove this header.
Option B: cut a release. Example diff (adjust version as appropriate):
Minor wording nit (optional):
🏁 Script executed:
Length of output: 149
Consolidate duplicate “Unreleased” sections in CHANGELOG.md
There are two
## [Unreleased] - 2025-08-07headers (lines 5 and 284). Per Keep a Changelog, only one Unreleased section is allowed. Please choose one of the following fixes:Minor wording nit (optional):
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[style] ~309-~309: Consider using “inaccessible” to avoid wordiness.
Context: ... - Custom models trained in Colab were not accessible to deployment infrastructure - Now pr...
(NOT_ABLE_PREMIUM)
🤖 Prompt for AI Agents