File tree Expand file tree Collapse file tree 2 files changed +0
-70
lines changed Expand file tree Collapse file tree 2 files changed +0
-70
lines changed Original file line number Diff line number Diff line change 1515import logging
1616import multiprocessing
1717import time
18- import warnings
1918
2019from collections import defaultdict
2120from concurrent .futures import ProcessPoolExecutor , wait
@@ -150,41 +149,6 @@ def sample_smc(
150149 `link <http://ascelibrary.org/doi/abs/10.1061/%28ASCE%290733-9399
151150 %282007%29133:7%28816%29>`__
152151 """
153- if isinstance (kernel , str ) and kernel .lower () in ("abc" , "metropolis" ):
154- warnings .warn (
155- f'The kernel string argument "{ kernel } " in sample_smc has been deprecated. '
156- f"It is no longer needed to distinguish between `abc` and `metropolis`" ,
157- FutureWarning ,
158- stacklevel = 2 ,
159- )
160- kernel = IMH
161-
162- if kernel_kwargs .pop ("save_sim_data" , None ) is not None :
163- warnings .warn (
164- "save_sim_data has been deprecated. Use pm.sample_posterior_predictive "
165- "to obtain the same type of samples." ,
166- FutureWarning ,
167- stacklevel = 2 ,
168- )
169-
170- if kernel_kwargs .pop ("save_log_pseudolikelihood" , None ) is not None :
171- warnings .warn (
172- "save_log_pseudolikelihood has been deprecated. This information is "
173- "now saved as log_likelihood in models with Simulator distributions." ,
174- FutureWarning ,
175- stacklevel = 2 ,
176- )
177-
178- parallel = kernel_kwargs .pop ("parallel" , None )
179- if parallel is not None :
180- warnings .warn (
181- "The argument parallel is deprecated, use the argument cores instead." ,
182- FutureWarning ,
183- stacklevel = 2 ,
184- )
185- if parallel is False :
186- cores = 1
187-
188152 if cores is None :
189153 cores = _cpu_count ()
190154
Original file line number Diff line number Diff line change @@ -236,40 +236,6 @@ def test_convergence_checks(self, caplog):
236236 pm .sample_smc (draws = 99 , progressbar = not _IS_WINDOWS )
237237 assert "The number of samples is too small" in caplog .text
238238
239- def test_deprecated_parallel_arg (self ):
240- with self .fast_model :
241- with pytest .warns (
242- FutureWarning ,
243- match = "The argument parallel is deprecated" ,
244- ):
245- pm .sample_smc (draws = 10 , chains = 1 , parallel = False )
246-
247- def test_deprecated_abc_args (self ):
248- with self .fast_model :
249- with pytest .warns (
250- FutureWarning ,
251- match = 'The kernel string argument "ABC" in sample_smc has been deprecated' ,
252- ):
253- pm .sample_smc (draws = 10 , chains = 1 , kernel = "ABC" )
254-
255- with pytest .warns (
256- FutureWarning ,
257- match = 'The kernel string argument "Metropolis" in sample_smc has been deprecated' ,
258- ):
259- pm .sample_smc (draws = 10 , chains = 1 , kernel = "Metropolis" )
260-
261- with pytest .warns (
262- FutureWarning ,
263- match = "save_sim_data has been deprecated" ,
264- ):
265- pm .sample_smc (draws = 10 , chains = 1 , save_sim_data = True )
266-
267- with pytest .warns (
268- FutureWarning ,
269- match = "save_log_pseudolikelihood has been deprecated" ,
270- ):
271- pm .sample_smc (draws = 10 , chains = 1 , save_log_pseudolikelihood = True )
272-
273239 def test_ordered (self ):
274240 """
275241 Test that initial population respects custom initval, especially when applied
You can’t perform that action at this time.
0 commit comments