Skip to content

Config-driven adaptive-risk offloading algorithm#63

Merged
ff225 merged 4 commits into
mainfrom
feature/dynamic-algorithm
Jul 14, 2026
Merged

Config-driven adaptive-risk offloading algorithm#63
ff225 merged 4 commits into
mainfrom
feature/dynamic-algorithm

Conversation

@lbedogni

@lbedogni lbedogni commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Rebased feature/dynamic-algorithm onto current main (was 4 ahead / 10 behind) and resolved the conflicts with the recently merged work (configurable EMA alpha #56, device-only network cost #57, profiler dead-code removal #58, and the print→logging change #60).

The branch adds a pluggable, config-driven offloading algorithm:

  • New offloading: config section selecting static (legacy) or adaptive_risk, with a tunable adaptive_risk block (network EWMA, uncertainty/device-load weighting, hysteresis, probe probability). Documented in docs/config/server.full.yaml, src/server/settings.yaml, and docs/CONFIGURATION.md; validated in sciot.config.
  • adaptive_risk.py (risk-aware, network-EWMA + device-load-aware layer selection) and a factory.py that builds the configured algorithm per device with per-device adaptive state.
  • Adaptive/device-load-aware offloading wired into RequestHandler alongside the existing EMA-based timing updates.
  • Repeating client/server inference-table headers and surfacing of server transport startup failures.

Conflict-resolution notes

  • Kept both load_offloading_ema_alpha_config (from main) and the new load_offloading_config.
  • The branch's inference-table header/row helpers were converted from print() to logger.info() to stay consistent with the merged structured-logging change (Replace print() with structured logging in request/endpoint handlers #60) and keep the tests/unit/test_no_print_statements.py regression test passing.
  • Merged the offloading_algo.ema_alpha and new offloading.* config validation cases (both retained).

Test plan

  • uv run pytest tests/unit tests/integration -m "not external_server and not model_artifact" — 201 passed, 1 skipped.
  • uv run pytest tests/test_offloading_algo tests/test_mqtt_client tests/integration/test_http_end_to_end.py tests/integration/test_http_protocol_validation.py — 22 passed.
  • No print( left in request_handler.py; no conflict markers remain.

@ff225 ff225 force-pushed the feature/dynamic-algorithm branch from 200e3c9 to f585fe4 Compare July 13, 2026 15:17
@ff225 ff225 changed the title Feature/dynamic algorithm Config-driven adaptive-risk offloading algorithm Jul 13, 2026
@ff225 ff225 merged commit 3f13290 into main Jul 14, 2026
3 checks passed
@ff225 ff225 deleted the feature/dynamic-algorithm branch July 14, 2026 07:35
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