Commit 0a278e7
fix(stat): Caculate correct fitting stat when using default fparam and using share fitting. (#5038)
In this PR:
1. Support writing fitting stat to `stat_file` and loading fitting stat
from `stat_file`
2. Ensure the fitting stat calculate is correct when using
`default_fparam`
3. Support sharing fitting stat when using `share_fitting` in multitask
mode.
4. Print the process of calculating fitting stat to the board via
`log.info`.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Default frame parameters auto-fill missing samples and are exposed via
a new accessor.
* Compute/load/save per-parameter statistics to/from optional stat
files.
* Multitask training adds probability-weighted parameter sharing and
propagates default fparam into data requirements.
* Statistic items support scalar scaling for aggregation.
* **Refactor**
* Parameter-sharing and statistic-propagation flows reorganized for
consistent buffering and persistence.
* **Tests**
* New tests and test data for stats computation, persistence, and
multitask sharing.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Chenqqian Zhang <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent e98dc5a commit 0a278e7
File tree
15 files changed
+935
-82
lines changed- deepmd
- pd/model
- atomic_model
- task
- pt
- model
- atomic_model
- model
- task
- train
- utils
- source/tests/pt
- model/water/data/data_1
- set.000
15 files changed
+935
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
407 | 408 | | |
408 | 409 | | |
409 | 410 | | |
| |||
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
| 420 | + | |
| 421 | + | |
419 | 422 | | |
420 | 423 | | |
421 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
422 | 427 | | |
423 | 428 | | |
424 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
332 | | - | |
| 341 | + | |
333 | 342 | | |
334 | 343 | | |
335 | 344 | | |
336 | 345 | | |
337 | 346 | | |
338 | 347 | | |
| 348 | + | |
339 | 349 | | |
340 | 350 | | |
341 | 351 | | |
| |||
348 | 358 | | |
349 | 359 | | |
350 | 360 | | |
| 361 | + | |
| 362 | + | |
351 | 363 | | |
352 | 364 | | |
353 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
354 | 368 | | |
355 | 369 | | |
356 | 370 | | |
| |||
361 | 375 | | |
362 | 376 | | |
363 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
364 | 381 | | |
365 | 382 | | |
366 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
535 | 538 | | |
536 | 539 | | |
537 | 540 | | |
| |||
0 commit comments