Config-driven adaptive-risk offloading algorithm#63
Merged
Conversation
200e3c9 to
f585fe4
Compare
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.
Summary
Rebased
feature/dynamic-algorithmonto currentmain(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:
offloading:config section selectingstatic(legacy) oradaptive_risk, with a tunableadaptive_riskblock (network EWMA, uncertainty/device-load weighting, hysteresis, probe probability). Documented indocs/config/server.full.yaml,src/server/settings.yaml, anddocs/CONFIGURATION.md; validated insciot.config.adaptive_risk.py(risk-aware, network-EWMA + device-load-aware layer selection) and afactory.pythat builds the configured algorithm per device with per-device adaptive state.RequestHandleralongside the existing EMA-based timing updates.Conflict-resolution notes
load_offloading_ema_alpha_config(frommain) and the newload_offloading_config.print()tologger.info()to stay consistent with the merged structured-logging change (Replace print() with structured logging in request/endpoint handlers #60) and keep thetests/unit/test_no_print_statements.pyregression test passing.offloading_algo.ema_alphaand newoffloading.*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.print(left inrequest_handler.py; no conflict markers remain.