snap-stanford / UCE

UCE is a zero-shot foundation model for single-cell gene expression data
MIT License
120 stars 15 forks source link

RuntimeError: [enforce fail at inline_container.cc:129] . file in archive is not in a subdirectory: species_offsets.pkl #6

Closed Abhishaike closed 4 months ago

Abhishaike commented 6 months ago

Running it like this:

os.system(f'python UCE/eval_single_anndata.py --adata_path data/data.h5ad --species macaca_fascicularis --batch_size 12 --nlayers 33 --model_loc 33layer_model.torch')

And getting this error

╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ [/home/abhishaikemahajan/abhi_experiments/uce/UCE/eval_single_anndata.py:155](https://vscode-remote+ssh-002dremote-002babhi-002drfdiffusion.vscode-resource.vscode-cdn.net/home/abhishaikemahajan/abhi_experiments/uce/UCE/eval_single_anndata.py:155)  │
│ in <module>                                                                  │
│                                                                              │
│   152 │                                                                      │
│   153 │   args = parser.parse_args()                                         │
│   154 │   accelerator = Accelerator(project_dir=args.dir)                    │
│ ❱ 155 │   main(args, accelerator)                                            │
│   156                                                                        │
│                                                                              │
│ [/home/abhishaikemahajan/abhi_experiments/uce/UCE/eval_single_anndata.py:85](https://vscode-remote+ssh-002dremote-002babhi-002drfdiffusion.vscode-resource.vscode-cdn.net/home/abhishaikemahajan/abhi_experiments/uce/UCE/eval_single_anndata.py:85)   │
│ in main                                                                      │
│                                                                              │
│    82 │   processor = AnndataProcessor(args, accelerator)                    │
│    83 │   processor.preprocess_anndata()                                     │
│    84 │   processor.generate_idxs()                                          │
│ ❱  85 │   processor.run_evaluation()                                         │
│    86                                                                        │
│    87                                                                        │
│    88 if __name__ == "__main__":                                             │
│                                                                              │
│ [/home/abhishaikemahajan/abhi_experiments/uce/UCE/evaluate.py:145](https://vscode-remote+ssh-002dremote-002babhi-002drfdiffusion.vscode-resource.vscode-cdn.net/home/abhishaikemahajan/abhi_experiments/uce/UCE/evaluate.py:145) in          │
│ run_evaluation                                                               │
│                                                                              │
│   142 │   │   self.accelerator.wait_for_everyone()                           │
...
│    245 class _open_zipfile_writer_file(_opener):                             │
╰──────────────────────────────────────────────────────────────────────────────╯
RuntimeError: [enforce fail at inline_container.cc:129] . file in archive is not
in a subdirectory: species_offsets.pkl
Yanay1 commented 6 months ago

Could you please try running it from the command line in a terminal inside the UCE directory?

Abhishaike commented 6 months ago

Trying that now

Abhishaike commented 6 months ago

Had the exact same error running it in the terminal + in the UCE/ directory

Yanay1 commented 6 months ago

Can you attach a screenshot of the full output in terminal including the command? Thanks!

Abhishaike commented 6 months ago
Screen Shot 2023-12-06 at 10 43 44 AM

Yup, here's a screenshot!

Yanay1 commented 5 months ago

Could you please try pulling the latest version of the repo and running the default command again? Thanks!