@@ -71,9 +71,11 @@ def __init__(
71
71
>>> ...
72
72
>>> model = MyModel(model_config, sampler_config)
73
73
"""
74
- sampler_config = self .default_sampler_config if sampler_config is None else sampler_config
74
+ sampler_config = (
75
+ self .get_default_sampler_config () if sampler_config is None else sampler_config
76
+ )
75
77
self .sampler_config = sampler_config
76
- model_config = self .default_model_config if model_config is None else model_config
78
+ model_config = self .get_default_model_config () if model_config is None else model_config
77
79
78
80
self .model_config = model_config # parameters for priors etc.
79
81
self .model = None # Set by build_model
@@ -133,17 +135,17 @@ def output_var(self):
133
135
"""
134
136
raise NotImplementedError
135
137
136
- @property
138
+ @staticmethod
137
139
@abstractmethod
138
- def default_model_config ( self ) -> Dict :
140
+ def get_default_model_config ( ) -> Dict :
139
141
"""
140
142
Returns a class default config dict for model builder if no model_config is provided on class initialization
141
143
Useful for understanding structure of required model_config to allow its customization by users
142
144
Examples
143
145
--------
144
- >>> @classmethod
145
- >>> def default_model_config(self ):
146
- >>> Return {
146
+ >>> @staticmethod
147
+ >>> def default_model_config():
148
+ >>> return {
147
149
>>> 'a' : {
148
150
>>> 'loc': 7,
149
151
>>> 'scale' : 3
@@ -162,17 +164,17 @@ def default_model_config(self) -> Dict:
162
164
"""
163
165
raise NotImplementedError
164
166
165
- @property
167
+ @staticmethod
166
168
@abstractmethod
167
- def default_sampler_config (self ) -> Dict :
169
+ def get_default_sampler_config (self ) -> Dict :
168
170
"""
169
171
Returns a class default sampler dict for model builder if no sampler_config is provided on class initialization
170
172
Useful for understanding structure of required sampler_config to allow its customization by users
171
173
Examples
172
174
--------
173
- >>> @classmethod
174
- >>> def default_sampler_config(self ):
175
- >>> Return {
175
+ >>> @staticmethod
176
+ >>> def default_sampler_config():
177
+ >>> return {
176
178
>>> 'draws': 1_000,
177
179
>>> 'tune': 1_000,
178
180
>>> 'chains': 1,
0 commit comments