Skip to content

Work#23

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

Work#23
Rohan5commit merged 3 commits into
mainfrom
work

Conversation

@Rohan5commit
Copy link
Copy Markdown
Owner

No description provided.

codex and others added 3 commits May 13, 2026 14:58
…gic, and make trained-model endpoint handling more robust

### Motivation
- Allow workflow dispatch to run only the AI bot or only the Core bot via explicit inputs and gates in the CI workflow.
- Surface model-provided reason text and AI runtime metadata in emails instead of rewriting reasons, and include the performance period start in reports.
- Enable soft "neutral breakout" behavior for the LLM predictions to allow opportunistic soft-cash deployments when appropriate.
- Make the trained-model HTTP client resilient to alternate endpoint shapes and tolerate certain missing `/health` endpoints for Cerebrium-style backends.

### Description
- CI workflow: added a new `disable_core_trading` boolean input and gated the Core run with `!inputs.disable_core_trading`, and loosened an AI run dependency so the Cerebrium AI job can proceed without the warm step outcome.
- Email notifier: stopped synthesizing manager-friendly rationales and now returns the model-provided `decision_reason`/`reason`, added `performance_period_start` to report output and display, and added an AI runtime section for `subject_tag == 'AI'` to show backend/model/status/fallback/router info.
- Positions & main reporting: added `get_performance_period_start` to `PositionTracker` and populate `performance_period_start` for both Core and AI reports in `main.py`.
- LLM prediction logic: implemented soft neutral-breakout logic in `llm_trader.py` that can convert a neutral prediction into a directional signal based on class probabilities and `soft_cash_deploy_enabled`, with per-run awareness of existing open positions.
- Trained model client: added retry logic that will try an alternate prediction URL on `404`, a helper `_alternate_prediction_url`, and special-casing in `wait_until_ready` to treat certain `404` health failures for Cerebrium providers as a skipped health probe so inference can proceed.

### Testing
- Ran the repository's automated test suite via `pytest` and the CI workflow smoke runs; the automated tests completed successfully.
- Exercised the modified `daily_trading_bot` workflow inputs via manual dispatch (AI-only and Core-disabled cases) in CI to validate gating logic.
- Performed local integration checks of trained-model client behavior against synthetic endpoints to verify alternate-URL retry and health-probe fallback behavior.
@Rohan5commit Rohan5commit merged commit b65e973 into main May 13, 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