File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
import abc
15
+ import sys
16
+ import warnings
15
17
16
18
from abc import ABC
17
19
from typing import Dict , cast
@@ -175,12 +177,18 @@ def __init__(
175
177
176
178
def initialize_population (self ) -> Dict [str , np .ndarray ]:
177
179
"""Create an initial population from the prior distribution"""
178
- result = sample_prior_predictive (
179
- self .draws ,
180
- var_names = [v .name for v in self .model .unobserved_value_vars ],
181
- model = self .model ,
182
- return_inferencedata = False ,
183
- )
180
+ sys .stdout .write (" " ) # see issue #5828
181
+ with warnings .catch_warnings ():
182
+ warnings .filterwarnings (
183
+ "ignore" , category = UserWarning , message = "The effect of Potentials"
184
+ )
185
+
186
+ result = sample_prior_predictive (
187
+ self .draws ,
188
+ var_names = [v .name for v in self .model .unobserved_value_vars ],
189
+ model = self .model ,
190
+ return_inferencedata = False ,
191
+ )
184
192
return cast (Dict [str , np .ndarray ], result )
185
193
186
194
def _initialize_kernel (self ):
You can’t perform that action at this time.
0 commit comments