fix: resolve stray marker in test and clean up model duplicates #1664
Open
Pratyush-Panda-2006 wants to merge 1 commit into
Open
fix: resolve stray marker in test and clean up model duplicates #1664Pratyush-Panda-2006 wants to merge 1 commit into
Pratyush-Panda-2006 wants to merge 1 commit into
Conversation
🎉 Welcome to Hybrid Recommender, @Pratyush-Panda-2006!Thank you for your first pull request! Here's what happens next:
⏱️ Please respond to any review comments within 48 hours. 📖 Resources: Happy contributing! 🚀 |
|
🎉 Welcome to Hybrid Recommender, @Pratyush-Panda-2006! This is your first contribution here! Labels added: PR Description Checklist: What happens next:
⏱️ Please respond to review comments within 48 hours. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes #1628
What Was Done
Upstream Synced: Checked out the main branch and pulled the latest changes from upstream/main.
Fixed Syntax & Indentation Errors:
Resolved an IndentationError in celery_app.py by removing an improperly indented and duplicate configuration line (app.conf.worker_max_tasks_per_child = 5).
Cleaned up src/model/hybrid_model.py which had a duplicated empty init constructor, duplicated set_weights/get_weights methods, and an IndentationError inside select_bandit_arm due to misplaced copy-paste chunks.
Resolved a NameError in backend/main.py where _clear_response_cache attempted to return an undefined result variable.
Fixed a NameError in /api/items where per_page was not defined. We added support for both limit and per_page parameters dynamically for full compatibility.
Integrated the paginated recommendation functionality cleanly into the main /api/recommend endpoint and removed the duplicate route definition (recommend_item).
Implemented caching headers (X-Cache: MISS) in /api/search on cache misses.
Fixed Unit Tests:
Updated the health check test in
tests/test_api.py
to mock get_supabase correctly on both the backend.main and src.data.db namespaces and assert the updated response fields.