Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Errors in running notebook #7

Closed
wershofe opened this issue Aug 2, 2022 · 5 comments · Fixed by #46
Closed

Errors in running notebook #7

wershofe opened this issue Aug 2, 2022 · 5 comments · Fixed by #46
Assignees

Comments

@wershofe
Copy link

wershofe commented Aug 2, 2022

Hello
When trying to run the notebook I run into a few problems:
1)
cpa.CPA.setup_anndata(adata,
drug_key='condition',
dose_key='dose_val',
categorical_covariate_keys=['cell_type'],
control_key='control',
combinatorial=True,
)
TypeError: register_fields() got unexpected keyword arguments {'combinatorial': True} passed without a source_registry.

model = cpa.CPA(adata=adata,
n_latent=256,
loss_ae='gauss',
doser_type='logsigm',
split_key='split',
**ae_hparams,
)
TypeError: init() missing 1 required positional argument: 'n_cat_list'

Are you able to provide solutions?
Thank you

@yanwu2014
Copy link

I'm also running into this issue, seems like VanillaEncoder and DecoderNormal expect n_cat_list as a parameter with no default value specified?

@Naghipourfar
Copy link
Collaborator

Hi,
Just published a new version with this issue fixed recently. Tutorials are also updated with the latest API. Sorry for the inconvenience. Please let me know if anything goes wrong.

@yanwu2014
Copy link

Awesome it's working for me now!

@tuln128
Copy link

tuln128 commented Sep 28, 2022

Hi, Just published a new version with this issue fixed recently. Tutorials are also updated with the latest API. Sorry for the inconvenience. Please let me know if anything goes wrong.

Hello @Naghipourfar,
In the updated tutorial notebooks, it seems the trainer_params was assigned with arbitrary values (following is the example from the GSM.ipynb file:

trainer_params = {
'n_epochs_warmup': 5,
'adversary_lr': 0.0008847032648856746,
'adversary_wd': 9.629190571404551e-07,
'adversary_steps': 3,
'autoencoder_lr': 0.0007208558788012054,
'autoencoder_wd': 1.2280838320404273e-07,
'dosers_lr': 0.0008835011062896268,
'dosers_wd': 5.886005123780177e-06,
'penalty_adversary': 63.44954424334805,
'reg_adversary': 48.73324753854268,
'cycle_coeff': 7.19539336141403,
'step_size_lr': 25,
}
).

I am wondering how these hyperparameter values were decided (randomly or by optimized tuning)? If the latter is correct, could you please share how to conduct hyperparameter tuning for CPA model?

Thank you very much, and I am looking forward to your feedback.
Kind regards,

Naghipourfar added a commit that referenced this issue Aug 31, 2023
…ning techniques added

- Mixup added
- Documentation added for most of functions
- Tutorial notebooks for Combo Sci-plex and Norman et al. updated
- FocalLoss added for adversarial training
- More efficient pre-processing algorithm added
- unnecessary methods removed
- GSM notebook removed
- dependencies has been updated
@ArianAmani
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants