fix(imports):resolve detection startup command in README#132
fix(imports):resolve detection startup command in README#132Prarthana124 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThe README's sample video detection command is updated to use Python module invocation ( ChangesREADME Documentation Update
Possibly related issues
Poem
🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
268-281:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClarify the working directory for the detection command.
After step 4 (line 268), the user is in the
services/detectiondirectory, but the command at line 281 requires execution from the project root. Thepython -m services.detection.detectionsyntax expects theservicespackage to be importable from the current working directory.Add an explicit instruction to return to the project root before step 6, or note the required working directory in the command example.
📝 Suggested fix
### 6. Run detection on a sample video +From the project root directory: + ```bash python -m services.detection.detection --source data/sample_videos/sample.mp4Or alternatively, add a step to return to root: ```diff ### 5. Pull the VLM model (local inference) ```bash ollama pull llava:latest+### 6. Return to project root
+
+bash +cd ../.. +
+
-### 6. Run detection on a sample video
+### 7. Run detection on a sample video</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@README.mdaround lines 268 - 281, The README's step to run detection uses
"python -m services.detection.detection" which requires running from the project
root (so the services package is importable); update the docs to either (A) add
an explicit step after pulling the model that returns the user to the project
root (e.g., "cd ../..") and renumber the following step, or (B) change the
example run command to a path-relative invocation that works from
services/detection (e.g., run the module directly without -m) — reference the
exact string "python -m services.detection.detection" and the surrounding steps
(pull llava:latest and Run detection on a sample video) when making the change.</details> </blockquote></details> </blockquote></details>🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Outside diff comments: In `@README.md`: - Around line 268-281: The README's step to run detection uses "python -m services.detection.detection" which requires running from the project root (so the services package is importable); update the docs to either (A) add an explicit step after pulling the model that returns the user to the project root (e.g., "cd ../..") and renumber the following step, or (B) change the example run command to a path-relative invocation that works from services/detection (e.g., run the module directly without -m) — reference the exact string "python -m services.detection.detection" and the surrounding steps (pull llava:latest and Run detection on a sample video) when making the change.
|
Hi @Devnil434, the failing Phase 3 and Phase 4 checks appear to be related to existing repository workflow/test configuration issues and are unrelated to this documentation-only change. This PR only updates the README detection startup command to use module-style execution: python -m services.detection.detection --source data/sample_videos/sample.mp4 I verified locally on Windows 11 + Python 3.13 that the previous command caused import-related startup failures, while the updated command resolves the package import issue correctly. No application logic or workflow configuration was modified in this PR. |
This PR updates the README detection startup command to use module-style execution instead of direct script execution.
Problem
The previous command:
python services/detection/detection.py --source data/sample_videos/sample.mp4
caused import resolution issues during startup, resulting in errors such as:
ModuleNotFoundError: No module named 'libs.schemas'
and related package import failures.
Solution
Updated the README command to:
python -m services.detection.detection --source data/sample_videos/sample.mp4
This ensures Python resolves project packages correctly during startup.
Testing
This PR only updates documentation and does not modify application logic.
Summary by CodeRabbit
Fixes #129