Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Different key names in the pretrained model used in trapnell.ipynb #8

@Yun-Ching-Chen

Description

@Yun-Ching-Chen

Hi,

I downloaded the tar file and tried to run trapnell.ipynb.
The model in the notebook was not there: 'pretrained_models/sweep_sciplex3_old_reproduced_logsigm_model_seed=30_epoch=340.pt'

I picked another existing one: 'pretrained_models/sweep_sciplex3_prepared_logsigm/model_seed=30_epoch=120.pt'
But it gives me key error when running the next line:
model, datasets = prepare_cpa(args, state_dict=state)

250     datasets = load_dataset_splits(

--> 251 args["data"],
252 args["perturbation_key"],
253 args["dose_key"],

KeyError: 'data'

It looks like the keys in this pretrained model are different from the one used in the notebook:
args
{'dataset_path': 'datasets/sciplex3_prepared.h5ad',
'perturbation_key': 'condition',
'dose_key': 'dose_val',
'cell_type_key': 'cell_type',
'loss_ae': 'gauss',
'doser_type': 'logsigm',
'seed': 30,
'hparams': '',
'max_epochs': 2000,
'patience': 20,
'checkpoint_freq': 20,
'save_dir': '/checkpoint/klanna/sweep_sciplex3_prepared_logsigm',
'sweep_seeds': 200}

I wonder if I used the wrong version of the pretrained model to reproduce this notebook?

Thanks,
Yun-Ching

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions