Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

projector: fix RunPaths result aliasing #4508

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

wchargin
Copy link
Contributor

@wchargin wchargin commented Dec 23, 2020

Summary:
This rolls forward #4479 (see that commit for context) with changes due
to Google-internal, non-TensorBoard code that monkey patches some of the
projector internals:

  • The _run_paths field is now updated only during _update_configs,
    to ensure that each change to _run_paths gives _configs the
    opportunity to update.
  • Configs/run paths are no longer updated in __init__, since that
    may be expensive and involve file access (even with a multiplexer).
  • The _run_paths field is now always a dict rather than None,
    fixing an existing bug wherein accessing configs on a plugin with
    no multiplexer would raise an AttributeError.

This reverts commit 4c9a699, and
therefore reinstates commit 638014e.

Test Plan:
Test plan from #4479 still passes, and a test sync now passes as well.
Also tested pointing the projector at a logdir with no runs but with
checkpoint data at root, as fixed in #3694; this worked in the original
version of this change (#4479), but it works now, too.

Test sync: http://cl/350223680.

wchargin-branch: projector-fix-aliasing

Summary:
This rolls forward #4479 (see that commit for context) with changes due
to Google-internal, non-TensorBoard code that monkey patches some of the
projector internals:

  - The `_run_paths` field is now updated only during `_update_configs`,
    to ensure that each change to `_run_paths` gives `_configs` the
    opportunity to update.
  - Configs/run paths are no longer updated in `__init__`, since that
    may be expensive and involve file access (even with a multiplexer).
  - The `_run_paths` field is now always a `dict` rather than `None`,
    fixing an existing bug wherein accessing `configs` on a plugin with
    no multiplexer would raise an `AttributeError`.

This reverts commit 4c9a699, and
therefore reinstates commit 638014e.

Test Plan:
Test plan from #4479 still passes, and a test sync now passes as well.
Also tested pointing the projector at a logdir with no runs but with
checkpoint data at root, as fixed in #3694; this worked in the original
version of this change (#4479), but it works now, too.

wchargin-branch: projector-fix-aliasing
wchargin-source: 0cb7e9c3917d5dc9f00616e35aa5bf756a51dea0
Copy link
Contributor

@psybuzz psybuzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. By the way, is there any link to the internal Google CL that has the failure that led to the revert, for reference?

@wchargin
Copy link
Contributor Author

wchargin commented Jan 5, 2021

Thanks! No submitted CL (since it was broken). Sent some internal
resources offline.

wchargin-branch: projector-fix-aliasing
wchargin-source: 5fbe2227f0cb997ab814ba974ae6e418ef7423de
@wchargin wchargin merged commit 23d9e5b into master Jan 5, 2021
@wchargin wchargin deleted the wchargin-projector-fix-aliasing branch January 5, 2021 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants