Commit 7caff51
committed
Fix OrbaxCheckpoint sharding and multi-host issues
- Fix sharding parameter passing in save/restore operations by passing as kwargs instead of setting attributes on StandardSave/StandardRestore objects
- Add robust error handling for distribution initialization with multiple error message patterns
- Add proper test skipping for JAX-only features when distribution module unavailable
- Add sharding parameter validation in constructor to prevent invalid types
- Update test expectations to match corrected sharding validation behavior
These changes ensure proper sharding support for JAX multi-host checkpointing while maintaining backward compatibility.1 parent ece595d commit 7caff51
File tree
2 files changed
+31
-17
lines changed- keras/src/callbacks
2 files changed
+31
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
348 | 358 | | |
349 | 359 | | |
350 | 360 | | |
| |||
395 | 405 | | |
396 | 406 | | |
397 | 407 | | |
398 | | - | |
399 | | - | |
400 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
401 | 416 | | |
402 | 417 | | |
403 | 418 | | |
| |||
529 | 544 | | |
530 | 545 | | |
531 | 546 | | |
| 547 | + | |
532 | 548 | | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
| 549 | + | |
| 550 | + | |
541 | 551 | | |
542 | 552 | | |
543 | 553 | | |
| |||
650 | 660 | | |
651 | 661 | | |
652 | 662 | | |
| 663 | + | |
653 | 664 | | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
| 665 | + | |
658 | 666 | | |
659 | 667 | | |
660 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
661 | 671 | | |
662 | 672 | | |
663 | 673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2044 | 2044 | | |
2045 | 2045 | | |
2046 | 2046 | | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
2047 | 2051 | | |
2048 | 2052 | | |
2049 | 2053 | | |
2050 | | - | |
| 2054 | + | |
2051 | 2055 | | |
2052 | 2056 | | |
2053 | 2057 | | |
| |||
0 commit comments