Skip to content

Resireg runs locally #24

Merged
DavidSeyserGit merged 6 commits into
mainfrom
resi
Jun 28, 2026
Merged

Resireg runs locally #24
DavidSeyserGit merged 6 commits into
mainfrom
resi

Conversation

@DavidSeyserGit

Copy link
Copy Markdown
Contributor

This pull request introduces the new twfarmbot-resireg-server component, integrating a local ReSiReg-Mini vision server into the TWFarmBot project. It also updates environment and documentation files to support the new vision server and adds client scripts for local inference. Additionally, a minor API change exposes chat metrics in responses.

New ReSiReg-Mini vision server integration:

  • Added the apps/resireg_server package, including a FastAPI-based server for vision tasks (traversability, segmentation, similarity, embeddings) using the SimonSchwaiger/resireg_mini model. Includes project metadata, a main entrypoint, and package structure. [1] [2] [3]
  • Added client scripts client_infer.py and client_traverse.py for running local inference and saving result images, demonstrating how to interact with the server. [1] [2]
  • Added a dedicated README for the vision server with usage and environment variable documentation.

Documentation and configuration updates:

  • Updated .env.example with new configuration options for FarmBot, LLM planner, and the vision server, including credentials, endpoints, and safety limits.
  • Expanded the main README.md to document how to run the new vision server alongside other services, including systemd integration and log viewing.

API improvement:

  • The /chat endpoint now includes a metrics field in its response for better observability of chat interactions.

- Implemented the ReSiReg-Mini server in `server.py` for handling image processing and chat completions.
- Created systemd service files for `twfarmbot-api`, `twfarmbot-resireg`, and `twfarmbot-ui`.
- Added scripts for managing services: `install_services.sh`, `start_all.sh`, `stop_all.sh`, `restart_all.sh`, and `logs.sh`.
- Ensured services are set to restart on failure and configured to run under the 'farmbot' user.
@DavidSeyserGit DavidSeyserGit requested review from a team and Copilot June 28, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread apps/resireg_server/src/twfarmbot_resireg_server/server.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/server.py Fixed
Comment thread services/planning_service/planning_service/harness/metrics.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/server.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/server.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/server.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/server.py Fixed
…odule level'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/server.py Fixed
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Outdated
- Cleaned up import statements and removed unused imports in resireg_cli.py, server.py, and huggingface.py.
- Enhanced formatting and consistency in function definitions and calls across multiple files.
- Simplified logic in the AgentLoop class for better clarity.
- Updated type hints for better type safety in various functions.
- Improved the structure of the chat_completions function to enhance readability.
- Adjusted test assertions for clarity and consistency in test_ui.py.
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Outdated
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Outdated
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Outdated
Comment thread apps/resireg_server/src/twfarmbot_resireg_server/resireg_cli.py Outdated
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@DavidSeyserGit DavidSeyserGit merged commit 079374c into main Jun 28, 2026
9 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.

2 participants