Commit 4669e6d
authored
Hparams: Fix metric info generation for sessions without run names. (#6541)
Fix a bug where we couldn't generate metric infos for
HyperparameterSessionRun without run names. We were failing to match the
sessions with the runs returned by scalars_metadata().
As an example:
When a HyperparameterSessionRun does not contain `run` field, we were
generating session_names of the form 'exp1/', 'exp2/', etc.. with a
trailing '/'. Meanwhile, runs would be just of the form 'exp1/run_name'.
The logic to match paths in _find_longest_parent_path() would first try
to find 'exp1/run_name' in session_names and then 'exp1' in
session_names. The second try would fail because of the trailing slashes
in session_names.
So, instead, when there is no `run` field in a HyperparameterSessionRun,
we drop the final '/' and just generate names like 'exp1', 'exp2',
etc... and the algorithm in _find_longest_parent_path() succeeds.1 parent 1b7c747 commit 4669e6d
File tree
2 files changed
+40
-2
lines changed- tensorboard/plugins/hparams
2 files changed
+40
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
617 | 655 | | |
618 | 656 | | |
619 | 657 | | |
| |||
0 commit comments