Skip to content

Use Colab serve_kernel_port_as_iframe API #4737

Open
@wchargin

Description

@wchargin

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions