Skip to content

Commit

Permalink
Adding requirements-test.txt and remove pymc3 tests (#2169)
Browse files Browse the repository at this point in the history
* Adding requirements-test.txt

* removing link to pymc3 (as it no longer exists)

* Removing pymc(3) from ci/requirements

* Removing pymc(3) from converter

* removing pymc(3) from tests

* Removing pymc(3) from doc/source/api/data.rst

* black

Co-authored-by: Oriol (ZBook) <oriol.abril.pla@gmail.com>
  • Loading branch information
camillebruckmann and OriolAbril authored Nov 30, 2022
1 parent 539fb69 commit e87d9e3
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 1,450 deletions.
11 changes: 1 addition & 10 deletions .azure-pipelines/azure-pipelines-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ jobs:
python.version: "3.9"
pystan.version: "latest"
cmdstanpy.version: "latest"
pymc3.version: "latest"
emcee.version: "latest"
name: "External latest"

Python_39_Special_versions:
python.version: "3.9"
pystan.version: 2.19.1.1
cmdstanpy.version: "github"
pymc3.version: "github"
emcee.version: 2
name: "External special"

Expand Down Expand Up @@ -74,14 +72,7 @@ jobs:
python -m pip --no-cache-dir install "emcee<3"
fi
if [ "$(pymc3.version)" = "github" ]; then
python -m pip --no-cache-dir --log log.txt install git+https://github.com/pymc-devs/pymc3@v3
cat log.txt
else
python -m pip --no-cache-dir install pymc3
fi
grep -Ev '^pystan|^cmdstanpy|^emcee|^pymc3' requirements-external.txt | xargs python -m pip install
grep -Ev '^pystan|^cmdstanpy|^emcee' requirements-external.txt | xargs python -m pip install
displayName: 'Install packages'
Expand Down
3 changes: 0 additions & 3 deletions arviz/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .io_netcdf import from_netcdf, to_netcdf
from .io_numpyro import from_numpyro
from .io_pyjags import from_pyjags
from .io_pymc3 import from_pymc3, from_pymc3_predictions
from .io_pyro import from_pyro
from .io_pystan import from_pystan
from .utils import extract, extract_dataset
Expand All @@ -31,8 +30,6 @@
"convert_to_inference_data",
"from_beanmachine",
"from_pyjags",
"from_pymc3",
"from_pymc3_predictions",
"from_pystan",
"from_emcee",
"from_cmdstan",
Expand Down
10 changes: 2 additions & 8 deletions arviz/data/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from .io_cmdstanpy import from_cmdstanpy
from .io_emcee import from_emcee
from .io_numpyro import from_numpyro
from .io_pymc3 import from_pymc3
from .io_pyro import from_pyro
from .io_pystan import from_pystan

Expand All @@ -23,14 +22,13 @@ def convert_to_inference_data(obj, *, group="posterior", coords=None, dims=None,
Parameters
----------
obj : dict, str, np.ndarray, xr.Dataset, pystan fit, pymc3 trace
obj : dict, str, np.ndarray, xr.Dataset, pystan fit
A supported object to convert to InferenceData:
| InferenceData: returns unchanged
| str: Attempts to load the cmdstan csv or netcdf dataset from disk
| pystan fit: Automatically extracts data
| cmdstanpy fit: Automatically extracts data
| cmdstan csv-list: Automatically extracts data
| pymc3 trace: Automatically extracts data
| emcee sampler: Automatically extracts data
| pyro MCMC: Automatically extracts data
| beanmachine MonteCarloSamples: Automatically extracts data
Expand Down Expand Up @@ -89,8 +87,6 @@ def convert_to_inference_data(obj, *, group="posterior", coords=None, dims=None,
return from_cmdstanpy(**kwargs)
else: # pystan or pystan3
return from_pystan(**kwargs)
elif obj.__class__.__name__ == "MultiTrace": # ugly, but doesn't make PyMC3 a requirement
return from_pymc3(trace=kwargs.pop(group), **kwargs)
elif obj.__class__.__name__ == "EnsembleSampler": # ugly, but doesn't make emcee a requirement
return from_emcee(sampler=kwargs.pop(group), **kwargs)
elif obj.__class__.__name__ == "MonteCarloSamples":
Expand Down Expand Up @@ -125,7 +121,6 @@ def convert_to_inference_data(obj, *, group="posterior", coords=None, dims=None,
"netcdf filename",
"numpy array",
"pystan fit",
"pymc3 trace",
"emcee fit",
"pyro mcmc fit",
"numpyro mcmc fit",
Expand All @@ -152,13 +147,12 @@ def convert_to_dataset(obj, *, group="posterior", coords=None, dims=None):
Parameters
----------
obj : dict, str, np.ndarray, xr.Dataset, pystan fit, pymc3 trace
obj : dict, str, np.ndarray, xr.Dataset, pystan fit
A supported object to convert to InferenceData:
- InferenceData: returns unchanged
- str: Attempts to load the netcdf dataset from disk
- pystan fit: Automatically extracts data
- pymc3 trace: Automatically extracts data
- xarray.Dataset: adds to InferenceData as only group
- xarray.DataArray: creates an xarray dataset as the only group, gives the
array an arbitrary name, if name not set
Expand Down
55 changes: 0 additions & 55 deletions arviz/data/io_pymc3.py

This file was deleted.

Loading

0 comments on commit e87d9e3

Please sign in to comment.