From 85cba3e2f73915818ae46688c7c73f4278088036 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:09:28 +0000 Subject: [PATCH 1/4] Initial plan From 6c27be10e503ce8c37a1cb58a1f48fd1c58a2f76 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:12:38 +0000 Subject: [PATCH 2/4] Create .github/copilot-setup-steps.yml for GitHub Copilot environment setup Co-authored-by: ricardoV94 <28983449+ricardoV94@users.noreply.github.com> --- .github/copilot-setup-steps.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/copilot-setup-steps.yml diff --git a/.github/copilot-setup-steps.yml b/.github/copilot-setup-steps.yml new file mode 100644 index 0000000000..9f6452f21b --- /dev/null +++ b/.github/copilot-setup-steps.yml @@ -0,0 +1,18 @@ +steps: + - name: "Set up Micromamba" + uses: mamba-org/setup-micromamba@v2 + with: + environment-name: pytensor-test + micromamba-version: "1.5.10-0" + init-shell: bash + post-cleanup: "all" + create-args: python=3.13 + + - name: "Install dependencies" + shell: micromamba-shell {0} + run: | + micromamba install --yes -q -c conda-forge python=3.13 mkl "numpy>=2.0" scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock pytest-sphinx + micromamba install --yes -q -c conda-forge "numba>=0.57" + micromamba install --yes -q -c conda-forge jax jaxlib numpyro equinox + pip install tfp-nightly + pip install -e ./ From 3f0db9bb3dbf913ff470a1e567fe29f95bf07169 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:19:13 +0000 Subject: [PATCH 3/4] Update copilot-setup-steps.yml to follow GitHub Actions workflow format Co-authored-by: ricardoV94 <28983449+ricardoV94@users.noreply.github.com> --- .github/copilot-setup-steps.yml | 63 ++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/.github/copilot-setup-steps.yml b/.github/copilot-setup-steps.yml index 9f6452f21b..ea06b57a2e 100644 --- a/.github/copilot-setup-steps.yml +++ b/.github/copilot-setup-steps.yml @@ -1,18 +1,47 @@ -steps: - - name: "Set up Micromamba" - uses: mamba-org/setup-micromamba@v2 - with: - environment-name: pytensor-test - micromamba-version: "1.5.10-0" - init-shell: bash - post-cleanup: "all" - create-args: python=3.13 +name: "Copilot Setup Steps" - - name: "Install dependencies" - shell: micromamba-shell {0} - run: | - micromamba install --yes -q -c conda-forge python=3.13 mkl "numpy>=2.0" scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock pytest-sphinx - micromamba install --yes -q -c conda-forge "numba>=0.57" - micromamba install --yes -q -c conda-forge jax jaxlib numpyro equinox - pip install tfp-nightly - pip install -e ./ +# Automatically run the setup steps when they are changed to allow for easy validation, and +# allow manual testing through the repository's "Actions" tab +on: + workflow_dispatch: + push: + paths: + - .github/copilot-setup-steps.yml + pull_request: + paths: + - .github/copilot-setup-steps.yml + +jobs: + # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. + copilot-setup-steps: + runs-on: ubuntu-latest + + # Set the permissions to the lowest permissions possible needed for your steps. + # Copilot will be given its own token for its operations. + permissions: + # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete. + contents: read + + # You can define any steps you want, and they will run before the agent starts. + # If you do not check out your code, Copilot will do this for you. + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: "Set up Micromamba" + uses: mamba-org/setup-micromamba@v2 + with: + environment-name: pytensor-test + micromamba-version: "1.5.10-0" + init-shell: bash + post-cleanup: "all" + create-args: python=3.13 + + - name: "Install dependencies" + shell: micromamba-shell {0} + run: | + micromamba install --yes -q -c conda-forge python=3.13 mkl "numpy>=2.0" scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock pytest-sphinx + micromamba install --yes -q -c conda-forge "numba>=0.57" + micromamba install --yes -q -c conda-forge jax jaxlib numpyro equinox + pip install tfp-nightly + pip install -e ./ From 45a45fa51b374f1b8c637a9c70e70b75779f6525 Mon Sep 17 00:00:00 2001 From: Ricardo Vieira <28983449+ricardoV94@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:24:14 +0200 Subject: [PATCH 4/4] Check installation was correct --- .github/copilot-setup-steps.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/copilot-setup-steps.yml b/.github/copilot-setup-steps.yml index ea06b57a2e..64ac90191a 100644 --- a/.github/copilot-setup-steps.yml +++ b/.github/copilot-setup-steps.yml @@ -45,3 +45,6 @@ jobs: micromamba install --yes -q -c conda-forge jax jaxlib numpyro equinox pip install tfp-nightly pip install -e ./ + micromamba list && pip freeze + python -c 'import pytensor; print(pytensor.config.__str__(print_doc=False))' + python -c 'import pytensor; assert pytensor.config.blas__ldflags != "", "Blas flags are empty"';