Skip to content

Work#25

Merged
Rohan5commit merged 3 commits into
mainfrom
work
May 14, 2026
Merged

Work#25
Rohan5commit merged 3 commits into
mainfrom
work

Conversation

@Rohan5commit
Copy link
Copy Markdown
Owner

No description provided.

codex and others added 3 commits May 14, 2026 02:48
…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.
@Rohan5commit Rohan5commit merged commit 7fd71f6 into main May 14, 2026
1 check 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