Work#25
Merged
Merged
Conversation
…me details, and workflow controls ### Motivation - Improve robustness of AI inference runs by pre-validating the Cerebrium predict endpoint and tolerating alternate endpoint shapes, and make workflow runs more flexible for core/AI-only invocations. - Surface AI runtime metadata and the performance period start in email reports to aid triage and visibility of model/backend choices. - Simplify manager-produced reasoning in email output and enable a soft-cash neutral breakout path so the AI can opportunistically deploy capital when conditions warrant. ### Description - Updated GitHub Actions workflow `/.github/workflows/daily_trading_bot.yml` to add a `disable_core_trading` input, gate the core job on it, add a `Verify Cerebrium predict endpoint` preflight step, and wire that step into AI-run and fallback logic so inference is only attempted when the predict endpoint check succeeds. - Simplified email rationale handling in `email_notifier.py` by returning model-provided `decision_reason`/`reason` directly for both entry and close reasons, added inclusion of `performance_period_start` and an `AI RUNTIME` summary block for AI-tagged emails, and adjusted pipeline reporting logic to avoid duplicated content. - Extended candidate scoring behavior in `llm_trader.py` to support "neutral breakout" overrides and a soft-cash deployment heuristic that can convert sufficiently strong directional probabilities into a non-neutral score when no open AI positions exist. - Added `get_performance_period_start` to `positions.py` to provide a best-effort period start date used in reports. - Plumbed performance period and richer AI backend/model/fallback info into the reports in `main.py` and formatted AI runtime summary text that is included in the AI email. - Improved resilience of HTTP prediction calls in `trained_model_client.py` by attempting an alternate prediction URL on `404`, skipping strict `/health` probing for some Cerebrium endpoint shapes that return `404`, and exposing the alternate URL logic via `_alternate_prediction_url`. ### Testing - Ran the repository unit test suite with `pytest`; tests passed. - Ran linter checks with `flake8`; no new lint errors were reported. - Validated the workflow YAML via a CI workflow/linters; the workflow syntax and added conditional paths validated successfully.
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.
No description provided.