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

Moving to pymc3 v4 (replaced theano with aesera) #59

Closed
wants to merge 372 commits into from
Closed

Conversation

vitkl
Copy link
Contributor

@vitkl vitkl commented Aug 20, 2021

Trying to use pymc3 version 4.0. For now, this is essentially just replacing all references to theano with aesera.

@vitkl
Copy link
Contributor Author

vitkl commented Aug 20, 2021

Doesn't work at the moment

### Summarising single cell clusters ###
### Creating model ### - time 0.03 min
### Analysis name: LocationModelLinearDependentWMultiExperiment_2experiments_59clusters_5563locations_12809genes
### Training model ###
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
/tmp/ipykernel_21703/2089725171.py in <module>
      3                               facecolor='white')
      4 
----> 5 r = cell2location.run_cell2location(
      6 
      7       # Single cell reference signatures as pd.DataFrame

/nfs/team283/vk7/software/miniconda3farm5/envs/cellpymc_test/lib/python3.9/site-packages/cell2location/run_c2l.py in run_cell2location(sc_data, sp_data, model_name, verbose, show_locations, return_all, summ_sc_data_args, train_args, model_kwargs, posterior_args, export_args)
    376         print('### Training model ###')
    377     if train_args['mode'] == 'normal':
--> 378         mod.train(n=train_args['n_restarts'], method=train_args['method'],
    379                   n_type=train_args['n_type'], progressbar=verbose)
    380 

/nfs/team283/vk7/software/miniconda3farm5/envs/cellpymc_test/lib/python3.9/site-packages/cell2location/models/base/pymc3_model.py in train(self, n, method, n_type, n_iter, learning_rate, reducing_lr, progressbar, scale_cost_to_minibatch)
    211             with self.model:
    212 
--> 213                 self.advi[name] = pm.ADVI()
    214 
    215             # when type is molecular cross-validation or bootstrap,

/nfs/team283/vk7/software/miniconda3farm5/envs/cellpymc_test/lib/python3.9/site-packages/pymc3/variational/inference.py in __init__(self, *args, **kwargs)
    466 
    467     def __init__(self, *args, **kwargs):
--> 468         super().__init__(MeanField(*args, **kwargs))
    469 
    470 

/nfs/team283/vk7/software/miniconda3farm5/envs/cellpymc_test/lib/python3.9/site-packages/pymc3/variational/approximations.py in __init__(self, *args, **kwargs)
    531     def __init__(self, *args, **kwargs):
    532         local_rv = kwargs.get("local_rv")
--> 533         groups = [self._group_class(None, *args, **kwargs)]
    534         if local_rv is not None:
    535             groups.extend(

/nfs/team283/vk7/software/miniconda3farm5/envs/cellpymc_test/lib/python3.9/site-packages/pymc3/variational/opvi.py in __init__(self, group, vfam, params, random_seed, model, local, rowwise, options, **kwargs)
    835     ):
    836         # XXX: Needs to be refactored for v4
--> 837         raise NotImplementedError("This class needs to be refactored for v4")
    838 
    839         if local and not self.supports_batched:

NotImplementedError: This class needs to be refactored for v4

@vitkl vitkl changed the title replaced theano with aesera Moving to pymc3 v4 (replaced theano with aesera) Aug 20, 2021
@vitkl vitkl force-pushed the master branch 2 times, most recently from 9af3385 to 0babdb2 Compare August 23, 2021 08:54
@vitkl vitkl closed this Aug 23, 2021
@vitkl vitkl deleted the pymc3_v4 branch August 23, 2021 09:16
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 this pull request may close these issues.

None yet

6 participants