Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove conditional_jit from plot_forest label_idx #2319

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python -m pip install wheel
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-optional.txt
python -m pip install asv!=0.6.2
python -m pip install asv==0.6.1
displayName: 'Install requirements'

- script: |
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

### Maintenance and fixes
- Fix deprecations introduced in latest pandas and xarray versions, and prepare for numpy 2.0 ones ([2315](https://github.com/arviz-devs/arviz/pull/2315)))

- Refactor ECDF code ([2311](https://github.com/arviz-devs/arviz/pull/2311))
- Refactor ECDF code ([2311](https://github.com/arviz-devs/arviz/pull/2311))
- Fix `plot_forest` when Numba is installed ([2319](https://github.com/arviz-devs/arviz/pull/2319))

### Deprecation

Expand Down
3 changes: 1 addition & 2 deletions arviz/data/inference_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ def __len__(self) -> int:

def __iter__(self) -> Iterator[str]:
"""Iterate over groups in InferenceData object."""
for group in self._groups_all:
yield group
yield from self._groups_all

def __contains__(self, key: object) -> bool:
"""Return True if the named item is present, and False otherwise."""
Expand Down
3 changes: 1 addition & 2 deletions arviz/data/io_pystan.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,7 @@
for item in par_keys:
_, shape = item.replace("]", "").split("[")
shape_idx_min = min(int(shape_value) for shape_value in shape.split(","))
if shape_idx_min < shift:
shift = shape_idx_min
shift = min(shift, shape_idx_min)

Check warning on line 679 in arviz/data/io_pystan.py

View check run for this annotation

Codecov / codecov/patch

arviz/data/io_pystan.py#L679

Added line #L679 was not covered by tests
# If shift is higher than 1, this will probably mean that Stan
# has implemented sparse structure (saves only non-zero parts),
# but let's hope that dims are still corresponding to the full shape
Expand Down
2 changes: 0 additions & 2 deletions arviz/plots/backends/bokeh/forestplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from ....stats import hdi
from ....stats.density_utils import get_bins, histogram, kde
from ....stats.diagnostics import _ess, _rhat
from ....utils import conditional_jit
from ...plot_utils import _scale_fig_size
from .. import show_layout
from . import backend_kwarg_defaults
Expand Down Expand Up @@ -277,7 +276,6 @@ def labels_and_ticks(self):
"""Collect labels and ticks from plotters."""
val = self.plotters.values()

@conditional_jit(forceobj=True, nopython=False)
def label_idxs():
labels, idxs = [], []
for plotter in val:
Expand Down
2 changes: 0 additions & 2 deletions arviz/plots/backends/matplotlib/forestplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from ....stats.density_utils import get_bins, histogram, kde
from ....stats.diagnostics import _ess, _rhat
from ....sel_utils import xarray_var_iter
from ....utils import conditional_jit
from ...plot_utils import _scale_fig_size
from . import backend_kwarg_defaults, backend_show

Expand Down Expand Up @@ -236,7 +235,6 @@ def labels_and_ticks(self):
"""Collect labels and ticks from plotters."""
val = self.plotters.values()

@conditional_jit(forceobj=True, nopython=False)
def label_idxs():
labels, idxs = [], []
for plotter in val:
Expand Down