Skip to content

LoRAServerSocket refactor and CI workflow improvements#53

Merged
mdvillagra merged 13 commits into
mainfrom
marcos/ci
Nov 19, 2025
Merged

LoRAServerSocket refactor and CI workflow improvements#53
mdvillagra merged 13 commits into
mainfrom
marcos/ci

Conversation

@mdvillagra
Copy link
Copy Markdown
Collaborator

@mdvillagra mdvillagra commented Nov 19, 2025

Summary:

This PR improves the CI, code readability in key components, and streamline local development and testing workflows.

More details:

  • Simplified and clarified LoRAServerSocket initialization and related imports to improve readability and maintainability.
  • Updated workflow names for better clarity.
  • Refactored CI configuration for consistency, clearer structure, and more robust Python dependency management.
  • Adjusted coverage threshold from 40% to 30% to better reflect the current state of the test suite while still enforcing a minimum bar.
  • Project configuration & scripts:
    • Refactored helper scripts to improve formatting and consistency across the codebase.
    • Updated project configuration to align with the new CI and dependency setup.
  • Housekeeping:
    • Extended .gitignore to include .pytest_cache, keeping the repo cleaner and preventing unnecessary files from being tracked.

Note

Add GitHub Actions CI for lint/tests with 30% coverage, introduce dev extras, and refactor LoRA MPI sockets/client and scripts with timeouts and cleaner structure.

  • CI:
    • Add GitHub Actions workflow ci.yml with Python 3.11 linting (ruff) and tests + coverage (--cov-fail-under=30).
  • Project config:
    • Add dev optional dependencies (ruff, pytest, pytest-cov) in src/pyproject.toml.
    • Point readme to ../readme.md.
  • LoRA MPI server/client:
    • LoRAServerSocket: support configurable stop_timeout and apply to server socket timeout; cleanup imports and responses.
    • BaseModelClient/comm: patching flow retained; networking timeout handling and formatting improvements.
    • Use generate_proofs directly; streamline ONNX/JSON export (export_lora_onnx_json_mpi).
  • Scripts:
    • Reformat and standardize CLI args in base_model_user_sample_script.py, lora_contributor_sample_script.py (use stop_timeout=1.0), and verify_proofs.py.
  • Utilities:
    • Refine polynomial commitment implementation (polynomial_commit.py) with hiding Merkle commitments and verification API.
  • Ignore:
    • Ensure .coverage is ignored in .gitignore.

Written by Cursor Bugbot for commit ddceddb. This will update automatically on new commits. Configure here.

- Added newlines for better readability in base_model_user_sample_script.py, lora_contributor_sample_script.py, and verify_proofs.py.
- Reformatted argument definitions for clarity in all affected scripts.
- Adjusted the installation command for Python dependencies to use "src/[dev]".
- Renamed the pytest job to "tests & coverage" for clarity.
- Removed the safety check step from the linting process.
- Modified the CI workflow to install development dependencies from "src/[dev]".
- Corrected the README file path in pyproject.toml from "../README.md" to "../readme.md".
- Added optional development dependencies in pyproject.toml for better project structure.
- Renamed the lint job from "Lint & Security" to "lint" for uniformity.
- Updated the test command to run from the "tests/" directory instead of "src/tests/" for improved structure.
- Adjusted the coverage failure threshold in the test command to enhance flexibility in test coverage requirements.
- Updated string formatting from single quotes to double quotes in several files for uniformity.
- Added newlines for improved readability in multiple functions and classes across various modules.
- Enhanced error messages and print statements for better clarity during execution.
- Added a `stop_timeout` parameter to the `LoRAServerSocket` class for configurable socket timeout.
- Removed unused imports in `__init__.py` files across base_model_user_mpi and lora_contributor_mpi modules for improved clarity and reduced clutter.
- Changed the workflow name from "python-ci" to "CI" for improved clarity and consistency with naming conventions.
- Reformatted the constructor of the `LoRAServerSocket` class to enhance clarity by using multi-line argument definitions.
- Updated the `lora_contributor_sample_script.py` for consistent formatting of the `LoRAServerSocket` instantiation.
@mdvillagra mdvillagra marked this pull request as ready for review November 19, 2025 00:37
@BidhanRoy BidhanRoy self-requested a review November 19, 2025 17:05
Signed-off-by: Marcos Villagra <71292159+mdvillagra@users.noreply.github.com>
@mdvillagra mdvillagra merged commit cfdf317 into main Nov 19, 2025
3 checks passed
@mdvillagra mdvillagra deleted the marcos/ci branch November 19, 2025 17:16
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