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

fix ci errors #2351

Merged
merged 7 commits into from
Jun 5, 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
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:

- script: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install wheel build
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.1
python -m pip install asv
displayName: 'Install requirements'

- script: |
Expand Down
6 changes: 5 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ disable=missing-docstring,
consider-using-f-string,
# TODO: Remove this once update the code base.
unnecessary-lambda-assignment,
use-dict-literal
use-dict-literal,
possibly-used-before-assignment,
# TODO (maybe): Remove this if the exess of issues related to that are fixed
# https://github.com/pylint-dev/pylint/issues?q=is%3Aissue+is%3Aopen+used-before-assignment+label%3A%22C%3A+used-before-assignment%22
used-before-assignment

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
4 changes: 2 additions & 2 deletions arviz/stats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ def gradient(weights):
weights[i] = u_weights / np.sum(u_weights)

weights = weights.mean(axis=0)
ses = pd.Series(z_bs.std(axis=0), index=names) # pylint: disable=no-member
ses = pd.Series(z_bs.std(axis=0), index=ics.index) # pylint: disable=no-member

elif method.lower() == "pseudo-bma":
min_ic = ics.iloc[0][f"elpd_{ic}"]
z_rv = np.exp((ics[f"elpd_{ic}"] - min_ic) / scale_value)
weights = z_rv / np.sum(z_rv)
weights = (z_rv / np.sum(z_rv)).to_numpy()
ses = ics["se"]

if np.any(weights):
Expand Down
2 changes: 1 addition & 1 deletion arviz/tests/base_tests/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_compare_same(centered_eight, multidim_models, method, multidim):
else:
data_dict = {"first": centered_eight, "second": centered_eight}

weight = compare(data_dict, method=method)["weight"]
weight = compare(data_dict, method=method)["weight"].to_numpy()
assert_allclose(weight[0], weight[1])
assert_allclose(np.sum(weight), 1.0)

Expand Down
11 changes: 9 additions & 2 deletions asv_benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
// If missing or the empty string, the tool will be automatically
// determined by looking for tools on the PATH environment
// variable.
"environment_type": "conda",
"environment_type": "virtualenv",

// The command to run to build the project.
// copied from https://github.com/sympy/sympy/issues/26239 to fix the libmamba issue
"build_command": [
"python -m pip install build",
"python -m build --wheel -o {build_cache_dir} {build_dir}"
],

// timeout in seconds for installing any dependencies in environment
// defaults to 10 min
Expand All @@ -50,7 +57,7 @@

// The list of conda channel names to be searched for benchmark
// dependency packages in the specified order
"conda_channels": ["conda-forge", "defaults",],
// "conda_channels": ["conda-forge", "defaults",],

// The matrix of dependencies to test. Each key is the name of a
// package (in PyPI) and the values are version numbers. An empty
Expand Down