luke14free / pm-prophet

GAM timeseries modeling with auto-changepoint detection. Inspired by Facebook Prophet and implemented in PyMC3
327 stars 42 forks source link

AttributeError: 'str' object has no attribute 'value' #17

Closed clausherther closed 5 years ago

clausherther commented 5 years ago

Trying to run the same simple model with version 0.2.1, I get the error below.

m = PMProphet(df_city, name='model')

# Fit the model (using NUTS)
m.fit(method='NUTS')
~/.pyenv/versions/3.6.7/lib/python3.6/site-packages/pmprophet/model.py in fit(self, draws, chains, trace_size, method, map_initialization, finalize, step_kwargs, sample_kwargs)
    610             if draws:
    611                 if method != Sampler.ADVI:
--> 612                     step_method = method.value(**step_kwargs)
    613                     self.trace = pm.sample(
    614                         draws,

AttributeError: 'str' object has no attribute 'value'
clausherther commented 5 years ago

I see, you changed the signature for fit from 0.2.0 which broke the example code I had.

It's now

m.fit(method=Sampler.NUTS)
luke14free commented 5 years ago

exactly, I wanted to make sure people were using the right samplers.