You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which generates the following output (with debug logging on):
DEBUG:stancache.stancache:cache_dir set to .cached_models
DEBUG:stancache.stancache:processing item (N) as int
DEBUG:stancache.stancache:processing item (censor_time) as int
DEBUG:stancache.stancache:processing item (rate_coefs) as other (using xxhash)
DEBUG:stancache.stancache:processing item (rate_coefs) as other (using pickle)
DEBUG:stancache.stancache:note: item (rate_coefs) is of type: <class 'list'>
DEBUG:stancache.stancache:processing item (rate_form) as str
INFO:stancache.stancache:sim_data_exp_correlated: cache_filename set to sim_data_exp_correlated.cached.N_100.censor_time_20.rate_coefs_54462717316.rate_form_1 + sex.pkl
DEBUG:stancache.stancache:sim_data_exp_correlated: cache_filepath set to .cached_models/sim_data_exp_correlated.cached.N_100.censor_time_20.rate_coefs_54462717316.rate_form_1 + sex.pkl
INFO:stancache.stancache:sim_data_exp_correlated: Loading result from cache
/home/jacki/projects/survivalstan/survivalstan/formulas.py:132: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access/home/jacki/projects/survivalstan/survivalstan/formulas.py:133: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
class WideSurvData(SurvData):
/home/jacki/projects/survivalstan/survivalstan/formulas.py:132: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access/home/jacki/projects/survivalstan/survivalstan/formulas.py:133: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
class WideSurvData(SurvData):
/home/jacki/projects/survivalstan/survivalstan/formulas.py:132: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access/home/jacki/projects/survivalstan/survivalstan/formulas.py:133: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
class WideSurvData(SurvData):
/home/jacki/projects/survivalstan/survivalstan/formulas.py:132: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access/home/jacki/projects/survivalstan/survivalstan/formulas.py:133: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
class WideSurvData(SurvData):
DEBUG:stancache.stancache:cache_dir set to .cached_models
DEBUG:stancache.stancache:processing item (cython) as str
DEBUG:stancache.stancache:processing item (model_code) as other (using xxhash)
DEBUG:stancache.stancache:note: item (model_code) is of type: <class 'str'>
DEBUG:stancache.stancache:processing item (pystan) as str
DEBUG:stancache.stancache:processing item (chains) as int
DEBUG:stancache.stancache:processing item (data) as dict
DEBUG:stancache.stancache:processing item (data-D) as int
DEBUG:stancache.stancache:processing item (data-M) as int
DEBUG:stancache.stancache:processing item (data-N) as int
DEBUG:stancache.stancache:processing item (data-basis_evals) as np.ndarray
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-33-1baa659d7e65>in<module>
23 chains = 4,
24 seed = 9001,
---> 25 FIT_FUN = stancache.cached_stan_fit,
26 )
~/projects/survivalstan/survivalstan/survivalstan.py in fit_stan_survival_model(df, formula, event_col, model_code, file, model_cohort, time_col, sample_id_col, sample_col, group_id_col, group_col, timepoint_id_col, timepoint_end_col, make_inits, stan_data, grp_coef_type, FIT_FUN, drop_intercept, input_data, *args, **kwargs)
165 data=input_data.data,
166 *args,
--> 167 **kwargs
168 )
169
/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in cached_stan_fit(iter, chains, seed, *args, **kwargs)
249 if seed is None:
250 seed = config.get_setting_value('SEED')
--> 251 return _cached_stan_fit(seed=seed, iter=iter, chains=chains, **kwargs)
252
253
/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in _cached_stan_fit(model_name, file, model_code, force, cache_dir, cache_only, fit_cachefile, **kwargs)
213 model_cachefile, fit_cachefile = cached_stan_file(model_name=model_name, file=file, model_code=model_code,
214 cache_dir=cache_dir, fit_cachefile=fit_cachefile,
--> 215 include_modelfile=True, **kwargs)
216 cache_dir = _get_cache_dir(cache_dir)
217 model_name = _sanitize_model_name(model_name)
/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in cached_stan_file(model_name, file, model_code, cache_dir, fit_cachefile, cache_only, force, include_modelfile, prefix_only, **kwargs)
174 cache_dir=cache_dir, fit_cachefile=fit_cachefile, include_prefix=True)
175 if not fit_cachefile:
--> 176 fit_cachefile = '.'.join([model_prefix, 'stanfit', _make_digest(dict(**kwargs)), 'pkl'])
177 if include_modelfile:
178 return model_cachefile, fit_cachefile
/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in _make_digest(k, **kwargs)
110 """ 111 result = list()--> 112 result_dict = _make_digest_dict(k, **kwargs) 113 if result_dict is None: 114 return 'default'/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in _make_digest_dict(k, prefix) 68 logger.debug('processing item ({}) as dict'.format(pre_key)) 69 item = dict(sorted(item.items()))---> 70 s = _make_digest(item, prefix=key+'-') 71 result.update({pre_key: _digest(s.encode())}) 72 elif isinstance(item, pd.DataFrame):/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in _make_digest(k, **kwargs) 110 """
111 result = list()
--> 112 result_dict = _make_digest_dict(k, **kwargs)
113 if result_dict is None:
114 return'default'
/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in _make_digest_dict(k, prefix)
80 elif isinstance(item, np.ndarray):
81 logger.debug('processing item ({}) as np.ndarray'.format(pre_key))
---> 82 s = _xxhash_item(item)
83 result.update({pre_key: s})
84 elif isinstance(item, types.FunctionType):
/srv/conda/lib/python3.6/site-packages/stancache/stancache.py in _xxhash_item(item)
38
39 def _xxhash_item(item):
---> 40 h = xxhash.xxh64(item)
41 s = h.intdigest()
42 return s
ValueError: ndarray is not C-contiguous
The text was updated successfully, but these errors were encountered:
Encounter an error when testing hammelab/survivalstan@feature/royston-parmar (build log on wide data.
A reproducible example is:
Which generates the following output (with debug logging on):
The text was updated successfully, but these errors were encountered: