Getting started guide
Hi, I'm excited by the work you've done on the Pillar0 models and would love to see how it handles some additional datasets. I've been trying to download the model locally and load it using the transforms library but keep running into path errors. Do you have an example of how the model is supposed to be set up and used?
For reference, the Python code is
from transformers import AutoModel, AutoConfig
import os
# Load the model from remote
model_name = "YalaLab/Pillar0-AbdomenCT"
rev = "d73d111bb278b3f6411f3c8e72c7e6f8a5fb1bb8"
print("Trying a fresh download")
config = AutoConfig.from_pretrained(model_name, trust_remote_code=True, revision=rev)
model = AutoModel.from_config(config, trust_remote_code=True)
# Save the model locally
local_model_path = "./pillar0_abdomenCt_model/"
model.save_pretrained(local_model_path)
# Check: load the local model
local_model = AutoModel.from_pretrained(
local_model_path, trust_remote_code=True,
local_files_only=True, revision=rev)
print("Done.")
where local_model = AutoModel.from_pretrained(... triggers the error
FileNotFoundError: [Errno 2] No such file or directory: '/.../huggingface_cache/modules/transformers_modules/pillar0_abdomenCt_model/a340fb6efc9656f5/multimodal_atlas.py'
When I check, multimodal_atlas.py is indeed missing from the specified directory. Alternatively, I've tried cloning the repository via git clone. All of the files are downloaded, but the directory structure doesn't match what AutoModel.from_pretrained(...) is looking for.
Any help you can provide would be greatly appreciated.
Hello, this is a very hacky solution for now--could you try re-running the code? The cache should be populated correctly after the first time it's run. We'll work on a better alternative! Let us know if it works.