Commit 29abe6e
Expose
* change weights_only default to True
* add docs on weights_only arg
* add weights_only arg to checkpoint save. weights_only during test set based on ckpt version
* add weights_only arg to checkpoint_io
* woops, reverting changes
* permissions too
* fix link
* fix another link
* datamodule weights_only args
* wip: try safe_globals context manager for tests
* add weights_only arg to _run_standard_hparams_test
* weights_only=False when adding extra_args
* switch to lightning_utilities.cli requirements set-oldest (#21077)
* bump: try `deepspeed >=0.14.1,<=0.15.0` (#21076)
* try `deepspeed >=0.14.1,<=0.15.0`
* drop from oldest
* pip uninstall -y deepspeed
* error::DeprecationWarning
* weights_only=True default for torch>=2.6
* changelog
* ignore torch.load futurewarning
* add .*
* will this woork
* weights_only according pl version
* set env var TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1 for pl < 1.5.0
* weights_only=False for omegaconf hparams test
* default to weights_only=true for loading from state_dict from url
* weights_only=False for hydra
* Update src/lightning/fabric/utilities/cloud_io.py
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
* defaults for weights_only in torch.hub.load_state_dict_from_url
* default to weights_only=False for torch.hub.load_state_dict_from_url
* add weights_only to trainer.fit, validate, test, predict
* fix tests
* add weights_only arg
* specify weights_only kwarg
* weights_only for fsdp load
* Apply suggestions from code review
* Apply suggestions from code review
* default is none
* add weights_only args to strategies
* trainer default to weights_only=None
* wip: fix typing dump_checkpoint
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* weights_only as last arg
* asset called with none
* weights_only=False for torch>=2.6 in tests
* fix changelog description
* Empty-Commit
* Empty-Commit
* trigger ci
* skip ddp_fork on macos
---------
Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: Jirka B <j.borovec+github@gmail.com>
Co-authored-by: jirka <jirka.borovec@seznam.cz>
Co-authored-by: Deependu <deependujha21@gmail.com>weights_only for loading checkpoints with Trainer, LightningModule, LightningDataModule (#21072)1 parent b82db78 commit 29abe6e
File tree
29 files changed
+228
-78
lines changed- src/lightning
- fabric
- plugins/io
- strategies
- utilities
- pytorch
- core
- strategies
- trainer
- connectors
- tests
- tests_fabric/strategies/launchers
- tests_pytorch
- accelerators
- callbacks
- checkpointing
- models
- plugins
29 files changed
+228
-78
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
83 | | - | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
501 | | - | |
| 502 | + | |
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| 519 | + | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
| |||
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
589 | | - | |
| 590 | + | |
590 | 591 | | |
591 | 592 | | |
592 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | | - | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
411 | 412 | | |
412 | 413 | | |
413 | 414 | | |
| 415 | + | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
| |||
449 | 451 | | |
450 | 452 | | |
451 | 453 | | |
452 | | - | |
| 454 | + | |
453 | 455 | | |
454 | 456 | | |
455 | 457 | | |
| |||
461 | 463 | | |
462 | 464 | | |
463 | 465 | | |
464 | | - | |
| 466 | + | |
465 | 467 | | |
466 | 468 | | |
467 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
333 | | - | |
| 334 | + | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| 519 | + | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
| |||
608 | 609 | | |
609 | 610 | | |
610 | 611 | | |
611 | | - | |
| 612 | + | |
612 | 613 | | |
613 | 614 | | |
614 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| |||
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
73 | | - | |
| 85 | + | |
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
| |||
0 commit comments