tensorflow / tensorflow/tensorboard

Use Colab `serve_kernel_port_as_iframe` API

Open
#4,737 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The Colab folks have upstreamed our iframe creation logic with a helper
modeled after ours:

https://github.com/googlecolab/colabtools/blob/f31c2c03993b733b8f5ae7c7a451077f72ca6882/google/colab/output/_util.py#L66-L78

It’s available as:

from google.colab import output
output.serve_kernel_port_as_iframe(port)

…and we already only render to Colab if google.colab is present.
May as well use it, simplifying our code a bit?

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 by locating TensorBoard’s existing Colab-only iframe creation logic and compare it with the linked Colab helper, google.colab.output.serve_kernel_port_as_iframe(port). Done means the existing logic uses the upstream API and the relevant existing tests or checks still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.