Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BaseModel.prepare() unexpected behaviour #1152

Open
nrclaudio opened this issue Jan 19, 2024 · 2 comments
Open

BaseModel.prepare() unexpected behaviour #1152

nrclaudio opened this issue Jan 19, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nrclaudio
Copy link

According to the documentation of BaseModel.prepare() if there's no Lineage specified, the weights will be set to 1. In such case Line 366

probs = Lineage.from_adata(self.adata, backward=backward)

throws a KeyError: "Unable to find lineage data in adata.obsm['lineages_fwd']:

Therefore Line 432 is never reached :

if lineage is not None:
    weight_threshold, val = weight_threshold
    w = _densify_squeeze(probs.X, self._dtype)
    w[w < weight_threshold] = val
else: 
    w = np.ones(len(x), dtype=self._dtype) ##432

I know having no lineage computed is non-standard functionality within your pipeline, but I thought it might be worth bringing it up.

@nrclaudio nrclaudio added the bug Something isn't working label Jan 19, 2024
@michalk8
Copy link
Collaborator

michalk8 commented Feb 9, 2024

Hi @nrclaudio , thanks a lot for pointing this out, will fix to match the docs!

@Marius1311
Copy link
Collaborator

Hi @michalk8, can we close this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants