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

Pytorch lightning logger #5933

Open
genemerewether opened this issue Apr 11, 2024 · 6 comments
Open

Pytorch lightning logger #5933

genemerewether opened this issue Apr 11, 2024 · 6 comments
Labels
enhancement New feature or request 🐍 Python API Python logging API

Comments

@genemerewether
Copy link

Pytorch lightning has a Logger abstraction, through which they interface with Wandb, CometML, etc.
https://lightning.ai/docs/pytorch/stable/extensions/logging.html

Any plans for something similar wrapping the Rerun Python SDK?

@genemerewether genemerewether added enhancement New feature or request 👀 needs triage This issue needs to be triaged by the Rerun team labels Apr 11, 2024
@jleibs
Copy link
Member

jleibs commented Apr 11, 2024

Sounds like a great idea!

@emilk emilk added 🐍 Python API Python logging API and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Apr 16, 2024
@alexanderswerdlow
Copy link

Closely related, it would be great it there was seamless support for embedding HTML with providers such as Wandb. Most of the value in rerun seems difficult to express directly through a lightning logger and this would also support more users (coming from a former lightning user).

From what I can tell, this is already possible with a bit of work but could be made more seamless—and certainly more efficient.

@nikolausWest
Copy link
Member

Closely related, it would be great it there was seamless support for embedding HTML with providers such as Wandb. Most of the value in rerun seems difficult to express directly through a lightning logger and this would also support more users (coming from a former lightning user).

@alexanderswerdlow: Are you thinking about rendering an html page inside Rerun, or putting Rerun inside an html page? Html inside Rerun is pretty hard to get working, but Rerun inside html should be super easy. We publish an npm package to make that as easy as possible here: https://www.npmjs.com/package/@rerun-io/web-viewer. For a more advanced example, this (soon to be merged PR) with a Gradio plugin can be worth a look: radames/gradio-rerun-viewer#1

@alexanderswerdlow
Copy link

@nikolausWest I didn't see it clearly in the docs, but after taking a quick look at the notebook export code, I found rr.notebook.as_html()! It'd be great if there was a full-screen option [instead of having to specify a fixed H/W] but it works great other than that.

It's really useful to be able to share visualizations, so I think calling this out in the docs would be helpful. On a similar note, as a new user, the whole connect/serve/save is not very intuitive, like how a viewer runs its own server by default, that two ports are needed for rr.serve(), etc, so maybe a single docs page with all the connection details would be clearer. Overall though, love what you guys have built, it's a real breath of fresh air!

For completeness:

html = rr.notebook.as_html()
with open("rerun.html", "w") as f:
    f.write(html)

@nikolausWest
Copy link
Member

@alexanderswerdlow I hear you on the docs thing for sure.

Btw, just to make sure I understand what you're doing here, you're logging the html file as an artifact to W&B?

@alexanderswerdlow
Copy link

@nikolausWest Not sure if it's technically an artifact (maybe it creates one under the hood?) but either way, a simple wand.log({'data': wandb.Html(html)}) works!, although in the snippet above I just save to file to share separately [not through wandb].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🐍 Python API Python logging API
Projects
None yet
Development

No branches or pull requests

5 participants