tensorflow / tensorflow/tensorboard

Improve plugin asset traversal logic

Open
#1,943 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:backend core:summaries
Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

The legacy plugin asset system, for better or for worse, still doesn't have a good replacement. The built-in functionality in EventMultiplexer to retrieve lists of plugin assets is extremely slow (it traverses every single run directory, every time you call it), which has required plugins who depend on this retrieval process to resort to running it asynchronously in order to not block in is_active() or HTTP request processing.

We should rework this logic so it happens as part of the regular Reload() cycle for the EventMultiplexer, on the existing background thread, and the results are cached for quick retrieval.

This way we can stop implementing one-off threaded workarounds for the following plugins:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with EventMultiplexer’s plugin asset retrieval and its regular Reload() cycle. Compare the current asynchronous work in tensorboard/plugins/projector/projector_plugin.py, tensorboard/plugins/text/text_plugin.py, and tensorboard/plugins/profile/profile_plugin.py. Done means asset results are refreshed during Reload() and then available from a cache for quick retrieval.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.