Commit 06e94ad
[python-package] Load parameters from model string (#6852)
* [python-package] Test serialization and deserialization from in-memory string
Test case for #6851
* [python-package] Fill in `params` when loading from in-memory string
This fixes #6851 by using the same workaround as when loading the model
from a file.
* test_basic: use rng instead of legacy numpy RandomState
* test_basic: remove debug prints leftovers
Co-authored-by: James Lamb <[email protected]>
* test_basic: add boolean, array of float and array of integers to testcase
Co-authored-by: James Lamb <[email protected]>
* test_basic: make a cheaper model (2 rounds with 7 leaves each)
Co-authored-by: James Lamb <[email protected]>
* test_basic: bugfix typos
* python_package_test: move string load test from basic to engine
* test_engine: catch params ignored warnings
* test_engine: be explicit about parameters assertion
* test_engine: shush linter complaint
* test_basic: delete empty line
Co-authored-by: James Lamb <[email protected]>
* test_engine: even cheaper model with less features
Co-authored-by: James Lamb <[email protected]>
* test_engine: delete redundant assert
Co-authored-by: James Lamb <[email protected]>
* test_engine: run pre-commit and take it's word for it
* test_engine: be explicit in an E712 compliant way
* test_engine.py: pass different value as argument to make sure it is ignored
---------
Co-authored-by: James Lamb <[email protected]>
Co-authored-by: Nikita Titov <[email protected]>1 parent 0bbb02f commit 06e94ad
2 files changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3715 | 3715 | | |
3716 | 3716 | | |
3717 | 3717 | | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
3718 | 3721 | | |
3719 | 3722 | | |
3720 | 3723 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1498 | 1498 | | |
1499 | 1499 | | |
1500 | 1500 | | |
1501 | | - | |
| 1501 | + | |
1502 | 1502 | | |
1503 | 1503 | | |
1504 | 1504 | | |
| |||
1508 | 1508 | | |
1509 | 1509 | | |
1510 | 1510 | | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
1511 | 1555 | | |
1512 | 1556 | | |
1513 | 1557 | | |
| |||
0 commit comments