ITADN

Fix support for models with custom objective functions (Issue #92)

#93Pull Requestsiboehm 创建于 2025-05-05
S
siboehmcommented
Fixes #92 ## Summary - Adds support for models with custom objective functions where the `objective=` line is missing from the model file - Makes the 'objective' key nullable in the scanner - Properly handles missing objectives in the parser ## Changes Made 1. Updated `lleaves/compiler/ast/scanner.py` to make the 'objective' key nullable by adding `null_ok=True` 2. Modified `lleaves/compiler/ast/parser.py` to handle cases where the objective is not present in the scanned model 3. Added test case `test_custom_objective` to verify custom objective support ## Test plan - [x] Added test for custom objective model - [ ] Run existing test suite to ensure no regressions - [ ] Verify fix with user's actual custom objective model 🤖 Generated with [Claude Code](https://claude.ai/code)
合并状态:未合并 0 条评论