Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| nan_ratio_by_column = { | ||
| col: float(df[col].isnull().mean()) for col in df.columns | ||
| } | ||
| max_nan_ratio = max(nan_ratio_by_column.values(), default=0.0) | ||
|
|
There was a problem hiding this comment.
Allow sparse optional columns in validation
Validation now computes nan_ratio_by_column across every column and then fails if the maximum exceeds 1%, which includes optional columns such as the news text column added in _attach_news. When news ingestion is enabled, that column is expected to be mostly null (no headline every bar), so max_nan_ratio will routinely exceed the 1% threshold and _validate_or_raise will halt training/backtesting even though the required OHLCV data is present. Validation should ignore optional/sparse fields or limit the NaN check to required price columns to avoid blocking any configuration that enables news ingestion.
Useful? React with 👍 / 👎.
Summary
Testing
poetry run pytestpoetry run pre-commit run --all-filesCodex Task