Closed yanwu2014 closed 1 month ago
Thanks for the bug report @yanwu2014!
This change was actually intentional. We figured that it would be easier to work with the loader if there was less implicit behavior, especially when that implicit behavior ends up complicating the offsets you need to access the encoded variables. Now if you want the soma join ids you can access them by explicitly requesting them.
Ah I see, thanks for clarifying! Just a heads up I think the docstrings still say that the soma join ids will always be returned but I'll close this issue for now
The
ExperimentDataPipe
no longer returnssoma_joinids
by default if nothing is specified in theobs_column_names
parameterSpecifically:
I expected
soma_ids
to be a tensor of obs indexes but instead it's an empty tensor. It seems like it's due to a potential bug in the_ObsAndXIterator
class on line 340 in pytorch.py where:obs["soma_joinid"] = obs.index
should instead beobs_encoded["soma_joinid"] = obs.index
sinceobs_encoded
is what gets turned intoobs_tensor
and returnedHappy to put together a PR if this seems like the issue