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

Show 1D-tensors as bar charts #3769

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Show 1D-tensors as bar charts #3769

merged 2 commits into from
Oct 10, 2023

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Oct 10, 2023

Relax the bar-chart view's requirements, and strengthen the tensor view's requirements:

  • make bar-chart look for either BarChartIndicator or TensorIndicator
  • make tensor ignore anything with less than 2 dimensions (it can't display those anyway!)

import rerun as rr
import torch
rr.init("tensor", spawn=True)
rr.log("tensor", rr.Tensor(torch.rand(10,)))

image


Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@teh-cmc teh-cmc added 🧑‍💻 dev experience developer experience (excluding CI) 🦟 regression A thing that used to work in an earlier release include in changelog labels Oct 10, 2023
@teh-cmc teh-cmc merged commit 3b5a7b7 into main Oct 10, 2023
30 of 35 checks passed
@teh-cmc teh-cmc deleted the cmc/tensor1d_barchart branch October 10, 2023 09:52
@nikolausWest
Copy link
Member

I wonder if it would have made more sense to add an extra dimension instead and treat it like a 1 x N tensor? That way we make it possible for the user to choose what way they'd like to see their data. Like a tensor row or a bar chart depending on the indicator

@emilk emilk changed the title 1D tensors as bar charts Show 1D-tensors as bar charts Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) include in changelog 🦟 regression A thing that used to work in an earlier release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rr.Tensor not working for 1D tensors
3 participants