Skip to content

Conversation

@namsaraeva
Copy link
Collaborator

WIP

@falexwolf falexwolf changed the title ♻️ Rehaul the vitessce guide 📝 Overhaul the Vitessce guide Dec 15, 2025
@namsaraeva namsaraeva self-assigned this Dec 15, 2025
@namsaraeva namsaraeva added the documentation Improvements or additions to documentation label Dec 15, 2025
@namsaraeva
Copy link
Collaborator Author

namsaraeva commented Dec 15, 2025

Apparently this does not work:

vc_conf = ln.integrations.save_vitessce_config(vc) # returns Artifact

# and then:

vc.load() # no such method, even though this object is of class Artifact

but if I retrieve another vitessce.json from the instance, load works and even parses the json correctly:

public_vc_json = (
    ln.Artifact.connect("vitessce/examples").get("xxx").load()
) 

@falexwolf do you think this should be fixed? I will use a workaround for now but this should be discussed.

@namsaraeva
Copy link
Collaborator Author

This artifact does not have a working widget.

@falexwolf
Copy link
Member

@falexwolf do you think this should be fixed?

Thanks for spotting! Yes, this should be a very simple fix in artifact.load(). Do you want to give it a shot or would you rather I fix it? You call!

There should be logic for a "freshly created artifact", but maybe it's not triggering because dict is none of the officially supported from_xxx() objects. 🤔

It's probably better if I look through this.

@namsaraeva
Copy link
Collaborator Author

I looked through the failing lines again and

public_vc_json = (
    ln.Artifact.connect("vitessce/examples").get("xxx").load()
) 

fails on CI, too, but works fine if I run it locally. I don't get it.

@namsaraeva
Copy link
Collaborator Author

Screenshot 2025-12-15 at 20 17 37

vs

Screenshot 2025-12-15 at 20 18 33

@falexwolf
Copy link
Member

Can you share a full traceback? Because now I'm pretty confused 😅 -- I thought it was just about an artifact that hadn't yet been saved to the database.

@namsaraeva
Copy link
Collaborator Author

@falexwolf please have a look at the CI error, it is doing the weird thing again.

@falexwolf
Copy link
Member

Looking!

@falexwolf
Copy link
Member

falexwolf commented Dec 18, 2025

Ok, that's a very clear error .vitessce.json is not supported as a suffix in artifact.load(). I'm astonished it ever worked for you. It shouldn't!

We do support .vitessce.json as a suffix during registration via:

https://github.com/laminlabs/lamindb/blob/2772df7d1c2fbc34656478e21686033c7611dc03/lamindb/core/storage/_valid_suffixes.py#L8

So, it'd be trivial to get load() to work on .vitessce.json; it's a 1 line change here that you could make in a PR to lamindb. ☺️

https://github.com/laminlabs/lamindb/blob/2772df7d1c2fbc34656478e21686033c7611dc03/lamindb/core/loaders.py#L170

We just need to also map .vitessce.json onto the json loader, not just .json.

The question is: Why does this work for you locally? extract_suffix_from_path() should always yield .vitessce.json and not .json. Can you add a print() statement to see what's going on?

@namsaraeva
Copy link
Collaborator Author

@falexwolf this is so weird. I just ran the code from my screenshot again and it threw the NotImplementedError, like it was intended. But it worked before! The screenshot shows it! It is a mystery to me now. I will make a PR.

@falexwolf
Copy link
Member

Thanks for making the PR! Strange that it ever worked. It should never have worked. This is very simple code. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove read/write of old AnnData objects code in Vitessce guide Vitessce takes a long time

3 participants