Datasets:

Modalities:
Tabular
Text
Formats:
json
Size:
< 1K
ArXiv:
DOI:
Libraries:
Datasets
Dask
galtimur's picture
Upload 78 files
8f0a8fd verified
{"language": "Python", "id": 31, "repo_owner": "pymc-devs", "repo_name": "pymc", "head_branch": "ruff_linter", "workflow_name": "pre-commit", "workflow_filename": "pre-commit.yml", "workflow_path": ".github/workflows/pre-commit.yml", "contributor": "juanitorduz", "sha_fail": "6819090f9d2e65d80b6a257d63ea8bdea4900689", "sha_success": "c58501bed6eec60ded25671e28e627897d6bdc14", "workflow": "name: pre-commit\n\non:\n pull_request:\n push:\n branches: [main]\n\njobs:\n pre-commit:\n runs-on: ubuntu-latest\n env:\n SKIP: no-commit-to-branch\n steps:\n - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11\n - uses: actions/setup-python@v5\n with:\n python-version: \"3.9\" # Run pre-commit on oldest supported Python version\n - uses: pre-commit/[email protected]\n mypy:\n runs-on: ubuntu-latest\n defaults:\n run:\n shell: bash -l {0}\n steps:\n - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11\n - name: Cache conda\n uses: actions/cache@v3\n env:\n # Increase this value to reset cache if environment-test.yml has not changed\n CACHE_NUMBER: 0\n with:\n path: ~/conda_pkgs_dir\n key: ${{ runner.os }}-py39-conda-${{ env.CACHE_NUMBER }}-${{\n hashFiles('conda-envs/environment-test.yml') }}\n - name: Cache multiple paths\n uses: actions/cache@v3\n env:\n # Increase this value to reset cache if requirements.txt has not changed\n CACHE_NUMBER: 0\n with:\n path: |\n ~/.cache/pip\n $RUNNER_TOOL_CACHE/Python/*\n ~\\AppData\\Local\\pip\\Cache\n key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{\n hashFiles('requirements.txt') }}\n - uses: conda-incubator/setup-miniconda@v2\n with:\n miniforge-variant: Mambaforge\n miniforge-version: latest\n mamba-version: \"*\"\n activate-environment: pymc-test\n channel-priority: strict\n environment-file: conda-envs/environment-test.yml\n python-version: \"3.9\" # Run pre-commit on oldest supported Python version\n use-mamba: true\n use-only-tar-bz2: false # IMPORTANT: This may break caching of conda packages! See https://github.com/conda-incubator/setup-miniconda/issues/267\n - name: Install-pymc and mypy dependencies\n run: |\n conda activate pymc-test\n pip install -e .\n pip install --pre -U polyagamma\n python --version\n - name: Run mypy\n run: |\n conda activate pymc-test\n python ./scripts/run_mypy.py --verbose\n", "logs": [{"step_name": "pre-commit/4_Run [email protected]", "log": "##[group]Run pre-commit/[email protected]\nwith:\n extra_args: --all-files\nenv:\n SKIP: no-commit-to-branch\n pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib\n##[endgroup]\n##[group]Run python -m pip install pre-commit\n\u001b[36;1mpython -m pip install pre-commit\u001b[0m\nshell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}\nenv:\n SKIP: no-commit-to-branch\n pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib\n##[endgroup]\nCollecting pre-commit\n Downloading pre_commit-3.6.0-py2.py3-none-any.whl.metadata (1.3 kB)\nCollecting cfgv>=2.0.0 (from pre-commit)\n Downloading cfgv-3.4.0-py2.py3-none-any.whl.metadata (8.5 kB)\nCollecting identify>=1.0.0 (from pre-commit)\n Downloading identify-2.5.33-py2.py3-none-any.whl.metadata (4.4 kB)\nCollecting nodeenv>=0.11.1 (from pre-commit)\n Downloading nodeenv-1.8.0-py2.py3-none-any.whl.metadata (21 kB)\nCollecting pyyaml>=5.1 (from pre-commit)\n Downloading PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)\nCollecting virtualenv>=20.10.0 (from pre-commit)\n Downloading virtualenv-20.25.0-py3-none-any.whl.metadata (4.5 kB)\nRequirement already satisfied: setuptools in /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages (from nodeenv>=0.11.1->pre-commit) (58.1.0)\nCollecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit)\n Downloading distlib-0.3.8-py2.py3-none-any.whl.metadata (5.1 kB)\nCollecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit)\n Downloading filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)\nCollecting platformdirs<5,>=3.9.1 (from virtualenv>=20.10.0->pre-commit)\n Downloading platformdirs-4.1.0-py3-none-any.whl.metadata (11 kB)\nDownloading pre_commit-3.6.0-py2.py3-none-any.whl (204 kB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 204.0/204.0 kB 15.0 MB/s eta 0:00:00\nDownloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)\nDownloading identify-2.5.33-py2.py3-none-any.whl (98 kB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 98.9/98.9 kB 29.3 MB/s eta 0:00:00\nDownloading nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)\nDownloading PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 738.9/738.9 kB 62.7 MB/s eta 0:00:00\nDownloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 3.8/3.8 MB 94.8 MB/s eta 0:00:00\nDownloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 468.9/468.9 kB 74.7 MB/s eta 0:00:00\nDownloading filelock-3.13.1-py3-none-any.whl (11 kB)\nDownloading platformdirs-4.1.0-py3-none-any.whl (17 kB)\nInstalling collected packages: distlib, pyyaml, platformdirs, nodeenv, identify, filelock, cfgv, virtualenv, pre-commit\nSuccessfully installed cfgv-3.4.0 distlib-0.3.8 filelock-3.13.1 identify-2.5.33 nodeenv-1.8.0 platformdirs-4.1.0 pre-commit-3.6.0 pyyaml-6.0.1 virtualenv-20.25.0\n\n[notice] A new release of pip is available: 23.0.1 -> 23.3.2\n[notice] To update, run: pip install --upgrade pip\n##[group]Run python -m pip freeze --local\n\u001b[36;1mpython -m pip freeze --local\u001b[0m\nshell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}\nenv:\n SKIP: no-commit-to-branch\n pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib\n##[endgroup]\ncfgv==3.4.0\ndistlib==0.3.8\nfilelock==3.13.1\nidentify==2.5.33\nnodeenv==1.8.0\nplatformdirs==4.1.0\npre-commit==3.6.0\nPyYAML==6.0.1\nvirtualenv==20.25.0\n##[group]Run actions/cache@v3\nwith:\n path: ~/.cache/pre-commit\n key: pre-commit-3|/opt/hostedtoolcache/Python/3.9.18/x64|85a42e0c0d7ae6174d79f49ec88a69ec255502eb51f27814478804e4cfd430f9\n enableCrossOsArchive: false\n fail-on-cache-miss: false\n lookup-only: false\nenv:\n SKIP: no-commit-to-branch\n pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib\n##[endgroup]\nCache Size: ~74 MB (77731725 B)\n[command]/usr/bin/tar -xf /home/runner/work/_temp/64e9f7f2-65c6-4b3f-bffb-599fde6080b8/cache.tzst -P -C /home/runner/work/pymc/pymc --use-compress-program unzstd\nReceived 77731725 of 77731725 (100.0%), 74.0 MBs/sec\nCache restored successfully\nCache restored from key: pre-commit-3|/opt/hostedtoolcache/Python/3.9.18/x64|85a42e0c0d7ae6174d79f49ec88a69ec255502eb51f27814478804e4cfd430f9\n##[group]Run pre-commit run --show-diff-on-failure --color=always --all-files\n\u001b[36;1mpre-commit run --show-diff-on-failure --color=always --all-files\u001b[0m\nshell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}\nenv:\n SKIP: no-commit-to-branch\n pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib\n##[endgroup]\ncheck for merge conflicts............................................................\u001b[42mPassed\u001b[m\ncheck toml...........................................................................\u001b[42mPassed\u001b[m\ncheck yaml...........................................................................\u001b[42mPassed\u001b[m\ndebug statements (python)............................................................\u001b[42mPassed\u001b[m\nfix end of files.....................................................................\u001b[42mPassed\u001b[m\ndon't commit to branch..............................................................\u001b[43;30mSkipped\u001b[m\nfix requirements.txt.................................................................\u001b[42mPassed\u001b[m\ntrim trailing whitespace.............................................................\u001b[42mPassed\u001b[m\nApply Apache 2.0 License.............................................................\u001b[42mPassed\u001b[m\npyupgrade............................................................................\u001b[42mPassed\u001b[m\nruff.................................................................................\u001b[41mFailed\u001b[m\n\u001b[2m- hook id: ruff\u001b[m\n\u001b[2m- files were modified by this hook\u001b[m\n\nFound 5 errors (5 fixed, 0 remaining).\n\nruff-format..........................................................................\u001b[42mPassed\u001b[m\npydocstyle...........................................................................\u001b[42mPassed\u001b[m\nDisallow print statements............................................................\u001b[42mPassed\u001b[m\nCheck no tests are ignored...........................................................\u001b[42mPassed\u001b[m\nGenerate pip dependency from conda...................................................\u001b[42mPassed\u001b[m\nNo relative imports..................................................................\u001b[42mPassed\u001b[m\nCheck no links that should be cross-references are in the docs.......................\u001b[42mPassed\u001b[m\npre-commit hook(s) made changes.\nIf you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.\nTo run `pre-commit` as part of git workflow, use `pre-commit install`.\nAll changes made by hooks:\n\u001b[1mdiff --git a/docs/source/conf.py b/docs/source/conf.py\u001b[m\n\u001b[1mindex 9ef1d52..4dba6d9 100755\u001b[m\n\u001b[1m--- a/docs/source/conf.py\u001b[m\n\u001b[1m+++ b/docs/source/conf.py\u001b[m\n\u001b[36m@@ -16,6 +16,7 @@\u001b[m\n # serve to show the default.\u001b[m\n \u001b[m\n import os\u001b[m\n\u001b[32m+\u001b[m\n from pathlib import Path\u001b[m\n \u001b[m\n import pymc\u001b[m\n\u001b[1mdiff --git a/pymc/distributions/multivariate.py b/pymc/distributions/multivariate.py\u001b[m\n\u001b[1mindex 570c139..03ea4f3 100644\u001b[m\n\u001b[1m--- a/pymc/distributions/multivariate.py\u001b[m\n\u001b[1m+++ b/pymc/distributions/multivariate.py\u001b[m\n\u001b[36m@@ -30,9 +30,8 @@\u001b[m \u001b[mfrom pytensor.graph.op import Op\u001b[m\n from pytensor.raise_op import Assert\u001b[m\n from pytensor.sparse.basic import sp_sum\u001b[m\n from pytensor.tensor import TensorConstant, gammaln, sigmoid\u001b[m\n\u001b[31m-from pytensor.tensor.linalg import cholesky, det, eigh\u001b[m\n\u001b[32m+\u001b[m\u001b[32mfrom pytensor.tensor.linalg import cholesky, det, eigh, solve_triangular, trace\u001b[m\n from pytensor.tensor.linalg import inv as matrix_inverse\u001b[m\n\u001b[31m-from pytensor.tensor.linalg import solve_triangular, trace\u001b[m\n from pytensor.tensor.random.basic import dirichlet, multinomial, multivariate_normal\u001b[m\n from pytensor.tensor.random.op import RandomVariable\u001b[m\n from pytensor.tensor.random.utils import (\u001b[m\n\u001b[1mdiff --git a/pymc/distributions/transforms.py b/pymc/distributions/transforms.py\u001b[m\n\u001b[1mindex 3e2a5a0..7c0d971 100644\u001b[m\n\u001b[1m--- a/pymc/distributions/transforms.py\u001b[m\n\u001b[1m+++ b/pymc/distributions/transforms.py\u001b[m\n\u001b[36m@@ -18,6 +18,7 @@\u001b[m \u001b[mfrom functools import singledispatch\u001b[m\n import numpy as np\u001b[m\n import pytensor.tensor as pt\u001b[m\n \u001b[m\n\u001b[32m+\u001b[m\n # ignore mypy error because it somehow considers that\u001b[m\n # \"numpy.core.numeric has no attribute normalize_axis_tuple\"\u001b[m\n from numpy.core.numeric import normalize_axis_tuple # type: ignore\u001b[m\n\u001b[1mdiff --git a/pymc/math.py b/pymc/math.py\u001b[m\n\u001b[1mindex ddfcaa4..7c9ceaa 100644\u001b[m\n\u001b[1m--- a/pymc/math.py\u001b[m\n\u001b[1m+++ b/pymc/math.py\u001b[m\n\u001b[36m@@ -27,7 +27,6 @@\u001b[m \u001b[mimport scipy.sparse\u001b[m\n \u001b[m\n from pytensor.graph.basic import Apply\u001b[m\n from pytensor.graph.op import Op\u001b[m\n\u001b[31m-\u001b[m\n from pytensor.tensor import (\u001b[m\n abs,\u001b[m\n and_,\u001b[m\n\u001b[36m@@ -98,7 +97,6 @@\u001b[m \u001b[mfrom scipy.linalg import block_diag as scipy_block_diag\u001b[m\n \u001b[m\n from pymc.pytensorf import floatX, ix_, largest_common_dtype\u001b[m\n \u001b[m\n\u001b[31m-\u001b[m\n __all__ = [\u001b[m\n \"abs\",\u001b[m\n \"and_\",\u001b[m\n\u001b[1mdiff --git a/tests/distributions/test_mixture.py b/tests/distributions/test_mixture.py\u001b[m\n\u001b[1mindex 8dfa5a8..be3e1bc 100644\u001b[m\n\u001b[1m--- a/tests/distributions/test_mixture.py\u001b[m\n\u001b[1m+++ b/tests/distributions/test_mixture.py\u001b[m\n\u001b[36m@@ -14,7 +14,6 @@\u001b[m\n \u001b[m\n import warnings\u001b[m\n \u001b[m\n\u001b[31m-\u001b[m\n import numpy as np\u001b[m\n import pytensor\u001b[m\n import pytest\u001b[m\n##[error]Process completed with exit code 1.\n"}], "diff": "diff --git a/docs/source/conf.py b/docs/source/conf.py\nindex 9ef1d527a..4dba6d9f7 100755\n--- a/docs/source/conf.py\n+++ b/docs/source/conf.py\n@@ -16,6 +16,7 @@\n # serve to show the default.\n \n import os\n+\n from pathlib import Path\n \n import pymc\ndiff --git a/pymc/distributions/multivariate.py b/pymc/distributions/multivariate.py\nindex 570c13988..03ea4f3a5 100644\n--- a/pymc/distributions/multivariate.py\n+++ b/pymc/distributions/multivariate.py\n@@ -30,9 +30,8 @@ from pytensor.graph.op import Op\n from pytensor.raise_op import Assert\n from pytensor.sparse.basic import sp_sum\n from pytensor.tensor import TensorConstant, gammaln, sigmoid\n-from pytensor.tensor.linalg import cholesky, det, eigh\n+from pytensor.tensor.linalg import cholesky, det, eigh, solve_triangular, trace\n from pytensor.tensor.linalg import inv as matrix_inverse\n-from pytensor.tensor.linalg import solve_triangular, trace\n from pytensor.tensor.random.basic import dirichlet, multinomial, multivariate_normal\n from pytensor.tensor.random.op import RandomVariable\n from pytensor.tensor.random.utils import (\ndiff --git a/pymc/distributions/transforms.py b/pymc/distributions/transforms.py\nindex 3e2a5a069..7c0d97100 100644\n--- a/pymc/distributions/transforms.py\n+++ b/pymc/distributions/transforms.py\n@@ -18,6 +18,7 @@ from functools import singledispatch\n import numpy as np\n import pytensor.tensor as pt\n \n+\n # ignore mypy error because it somehow considers that\n # \"numpy.core.numeric has no attribute normalize_axis_tuple\"\n from numpy.core.numeric import normalize_axis_tuple # type: ignore\ndiff --git a/pymc/math.py b/pymc/math.py\nindex ddfcaa44d..7c9ceaa9e 100644\n--- a/pymc/math.py\n+++ b/pymc/math.py\n@@ -27,7 +27,6 @@ import scipy.sparse\n \n from pytensor.graph.basic import Apply\n from pytensor.graph.op import Op\n-\n from pytensor.tensor import (\n abs,\n and_,\n@@ -98,7 +97,6 @@ from scipy.linalg import block_diag as scipy_block_diag\n \n from pymc.pytensorf import floatX, ix_, largest_common_dtype\n \n-\n __all__ = [\n \"abs\",\n \"and_\",\ndiff --git a/tests/distributions/test_mixture.py b/tests/distributions/test_mixture.py\nindex 8dfa5a8ca..be3e1bcbd 100644\n--- a/tests/distributions/test_mixture.py\n+++ b/tests/distributions/test_mixture.py\n@@ -14,7 +14,6 @@\n \n import warnings\n \n-\n import numpy as np\n import pytensor\n import pytest\n", "difficulty": 1, "changed_files": ["docs/source/conf.py", "pymc/distributions/multivariate.py", "pymc/distributions/transforms.py", "pymc/math.py", "tests/distributions/test_mixture.py"], "commit_link": "https://github.com/pymc-devs/pymc/tree/6819090f9d2e65d80b6a257d63ea8bdea4900689"}