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

Searchspace improvements and project meta modernization #214

Merged
merged 73 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9cf0067
Implemented PySMT in Kernel Tuner
fjwillemsen Jun 14, 2023
fc3bef6
Added mapping of parameter names to integers for better perfomance
fjwillemsen Jun 15, 2023
f72e66b
Improved tests and compatibility for parameter mapping
fjwillemsen Jun 15, 2023
1e762f8
Switch from setup.py/cfg to pyproject.toml
fjwillemsen Jun 15, 2023
552c445
Added linting information, VS Code settings and recommendations
fjwillemsen Jun 15, 2023
ef83737
Always return compiled functions as a list, application of formatter
fjwillemsen Jun 28, 2023
18d3a55
Improvements to string to restriction parsing
fjwillemsen Jun 30, 2023
b684373
Major speedup due to restriction splitting with parameter usage detec…
fjwillemsen Jul 8, 2023
d9fcf76
Refactored tests for parsing restrictions due to changes
fjwillemsen Jul 8, 2023
b28ca74
Minor improvements to an assert and a testcase
fjwillemsen Jul 12, 2023
0f3ea46
Searchspace list to NumPy conversion only happens if needed
fjwillemsen Jul 20, 2023
cd3592e
Searchspace objects can now be initialized from ATF logfiles (caches)…
fjwillemsen Aug 10, 2023
8c65d22
Added safeguard to prevent changing ATF block size names after compil…
fjwillemsen Aug 10, 2023
31f465b
Fixed Constraint conversions
fjwillemsen Aug 15, 2023
930ac2f
Changed to non-forwardchecking by default, moved MaxProdConstraint to…
fjwillemsen Aug 15, 2023
41785d6
Parsing of common operations to python-constraint built-in Constraints
fjwillemsen Aug 17, 2023
49d73c0
Fixed an issue with converting restrictions to Constraints
fjwillemsen Aug 18, 2023
704d125
Enabled converting to Constraint with '>' and '<' as well, added use …
fjwillemsen Aug 18, 2023
7b436f2
Added mapping of '>' to '>=' and '<' to '<=' for single-variable rest…
fjwillemsen Aug 18, 2023
c8da4ea
Return None on trying to convert to numeric Constraint
fjwillemsen Aug 18, 2023
2d8df29
Automatic transformation of restrictions with multiple comparators to…
fjwillemsen Aug 21, 2023
4b504e6
Added support for PySMT on generated searchspaces
fjwillemsen Aug 22, 2023
36c013f
Several improvements and fixes for PySMT builder, especially for pres…
fjwillemsen Aug 23, 2023
8a5df97
Fixed an issue where restrictions would not be parsed to specific con…
fjwillemsen Aug 24, 2023
a576dba
Removed redundant parameter mapping
fjwillemsen Aug 24, 2023
9b44979
Minor fixes for testing
fjwillemsen Aug 24, 2023
4a26ff3
Made scikit-opt (skopt) optional in strategy bayes_opt
fjwillemsen Sep 8, 2023
a8a13b5
Changed to Poetry and pyproject.toml
fjwillemsen Sep 8, 2023
7436ffc
Added tests for pyproject.toml
fjwillemsen Sep 8, 2023
b399bcc
Updated changelog to reflect changes, updated VS Code settings
fjwillemsen Sep 8, 2023
f576195
Updated documentation to use pyproject file metadata, other minor upd…
fjwillemsen Sep 8, 2023
9ac2817
Minor bugfixes based on SonarCloud
fjwillemsen Sep 9, 2023
0b2cc7e
Re-added support for Python 3.8, updated dependencies accordingly
fjwillemsen Sep 11, 2023
4731d72
Updated GitHub Action workflows to use Poetry and Nox
fjwillemsen Sep 11, 2023
c87c059
Merge with Master
fjwillemsen Sep 11, 2023
0a0c684
Removed unnecessary pull_request trigger for howfairis, added manual …
fjwillemsen Sep 11, 2023
a9c7819
Updated workflows with new Setup Nox 2 and new checkout
fjwillemsen Sep 12, 2023
504ebbd
Removed Windows from test OSes
fjwillemsen Sep 12, 2023
06eacb3
Updated publishing workflow, expanded TODOs in changelog
fjwillemsen Sep 12, 2023
574458a
Finished PyPI publication workflow with Poetry
fjwillemsen Sep 12, 2023
f904206
Fixed errors and warnings with the docs, as well as compatiblity issues
fjwillemsen Sep 12, 2023
66e7998
Updated dependencies
fjwillemsen Sep 12, 2023
78eb535
Updated documentation for installation, development setup etc.
fjwillemsen Sep 12, 2023
66180ab
Minor updates: include notebook files in package, version bump
fjwillemsen Sep 14, 2023
72744e7
Removed usage of OrderedDict as per issue #209, minor changes to test…
fjwillemsen Sep 14, 2023
09aa0e9
Updated test workflow to include upload to CodeCov for each OS, impro…
fjwillemsen Sep 15, 2023
258e003
Disable automatic upload to CodeCov for now
fjwillemsen Sep 18, 2023
9a7b47f
Solved issue #139: Reimplemented Latin Hypercube Sampling with SciPy
fjwillemsen Sep 19, 2023
d9a8d9f
Improved Nox with optional dependencies for CUDA, HIP, OpenCL and arg…
fjwillemsen Sep 21, 2023
4fe7f01
Updated Contributing and Installation guidelines, specifically added …
fjwillemsen Sep 24, 2023
47c069c
Minor changes to dependencies and environment setup
fjwillemsen Sep 25, 2023
862cc75
Minor changes to dependencies and environment setup
fjwillemsen Sep 25, 2023
b7aa244
Added bruteforce solver to Searchspace object, improved tests for Sea…
fjwillemsen Sep 25, 2023
8dbb817
Solved a bug in the constraints parsing that caused wrong searchspace…
fjwillemsen Sep 26, 2023
b08950a
Added missing nox-poetry to test dependencies
fjwillemsen Sep 26, 2023
2e8edad
Added nox-poetry to GitHub test Action
fjwillemsen Sep 26, 2023
e4b6083
Added Poetry setup to Github Test Action
fjwillemsen Sep 26, 2023
25c5452
Added extensive development environment setup instructions, updated i…
fjwillemsen Sep 27, 2023
a39d5ae
Add an exception for the nvml_ parameter check if in simulation mode
fjwillemsen Sep 27, 2023
7843147
Added optional additional (non-dependency) installation to Noxfile, w…
fjwillemsen Sep 29, 2023
c777914
Fixed additional test input argument
fjwillemsen Sep 30, 2023
fee5220
Improved detection of CUDA version using NVCC
fjwillemsen Sep 30, 2023
468d254
Improved automatic selection of cupy prebuilt version, from most exac…
fjwillemsen Sep 30, 2023
4ffc1c4
Set the default environment used by Nox using a file
fjwillemsen Oct 2, 2023
d177260
Updated the documentation for the Noxenv file and other minor improve…
fjwillemsen Oct 2, 2023
33a2382
Updated VS code settings for testing from VS code, updated documentation
fjwillemsen Oct 2, 2023
8e20ccc
Fixed HIP import error, made backend import error messages point to d…
fjwillemsen Oct 3, 2023
91d2f57
Restored accidentally removed import
fjwillemsen Oct 3, 2023
a7fdedd
Merge with Master, fixed conflicts after merge of #189
fjwillemsen Oct 3, 2023
376373f
Added an option for Nox to remove the other environment caches before…
fjwillemsen Oct 3, 2023
034ee4c
Merged with pull request #216 to fix HIP backend argument passing
fjwillemsen Oct 3, 2023
634efde
Temporarily skip broken HIP tests as per issue #217, avoided error in…
fjwillemsen Oct 3, 2023
60ea924
Improved Noxfile functionality for removing environments after use, a…
fjwillemsen Oct 3, 2023
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
29 changes: 15 additions & 14 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: cffconvert
# This workflow validates the citation file in the repository

name: Citation file validation

on:
push:
paths:
- CITATION.cff
push:
paths:
- CITATION.cff

jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v2
validate:
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: "--validate"
- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: "--validate"
76 changes: 39 additions & 37 deletions .github/workflows/docs-on-release.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
name: Create versioned documentation on release
name: Build versioned documentation on release

on:
release:
types: [published]
release:
types: [published]

workflow_dispatch:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
environment: dev_environment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install dependencies
run: |
sudo apt-get update;
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install .[doc]
- name: Build and Commit
uses: sphinx-notes/pages@v2
with:
documentation_path: doc/source
target_path: ${{ env.RELEASE_VERSION }}
- name: Redirect stable to new release
run: |
echo "Redirecting stable to newly released version " $RELEASE_VERSION
rm -rf stable
ln -s $RELEASE_VERSION stable
git add stable
git commit -m "redirect stable to new version $RELEASE_VERSION"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
build:
environment: dev_environment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install dependencies
run: |
sudo apt-get update;
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install poetry
poetry install --with docs
- name: Build and Commit
uses: sphinx-notes/pages@v2 # NOTE when switching to v3, export dependencies to requirements.txt in pyproject.toml: `poetry export --with docs --without-hashes --format=requirements.txt > docs/requirements.txt`
with:
documentation_path: doc/source
target_path: ${{ env.RELEASE_VERSION }}
- name: Redirect stable to new release
run: |
echo "Redirecting stable to newly released version " $RELEASE_VERSION
rm -rf stable
ln -s $RELEASE_VERSION stable
git add stable
git commit -m "redirect stable to new version $RELEASE_VERSION"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
64 changes: 30 additions & 34 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
# This is a basic workflow to help you get started with Actions
name: Build documentation

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
push:
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:

# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Install dependencies
run: |
sudo apt-get update;
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install .[doc]
- name: Build and Commit
uses: sphinx-notes/pages@v2
with:
documentation_path: doc/source
target_path: latest
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Install dependencies
run: |
sudo apt-get update;
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install poetry
poetry install --with docs
- name: Build and Commit
uses: sphinx-notes/pages@v2 # NOTE when switching to v3, export dependencies to requirements.txt in pyproject.toml: `poetry export --with docs --without-hashes --format=requirements.txt > docs/requirements.txt`
with:
documentation_path: doc/source
target_path: latest
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
56 changes: 56 additions & 0 deletions .github/workflows/publish-python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow checks out a new release, builds it as a package (source and wheel) and publishes it to PyPI.

name: Publish Package

# Controls when the workflow will run
on:
# Workflow will run when a release has been published for the package
release:
types:
- published

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build_and_publish_as_package:
name: Package and upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/kernel_tuner
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Setup Poetry
uses: Gr1N/setup-poetry@v8
- name: Build the source distribution and pure-Python wheel
run: |
poetry install
poetry build
ls ./dist
- name: Check that the number of wheels is as expected and there is one source distribution
run: |
SOURCES_COUNT=$(ls -lR ./dist/*.tar.gz | wc -l)
echo "Number of source distributions: $SOURCES_COUNT"
if [ "$SOURCES_COUNT" -ne 1 ]; then
echo "::error::Number of source distributions $SOURCES_COUNT not equal to 1"
exit 1;
fi

EXPECTED_WHEELS_COUNT=1
WHEELS_COUNT=$(ls -lR ./dist/*.whl | wc -l)
echo "Number of wheel distributions: $WHEELS_COUNT"
if [ "$WHEELS_COUNT" -ne "$EXPECTED_WHEELS_COUNT" ]; then
echo "::error::Number of wheel distributions $WHEELS_COUNT not equal to $EXPECTED_WHEELS_COUNT"
exit 1;
fi
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
39 changes: 0 additions & 39 deletions .github/workflows/python-app.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/python-publish.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/test-python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will use Nox to run tests and lint for the supported Python versions, and upload the test coverage data.

name: Test

on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Test on ${{ matrix.os }} with all supported Python versions
runs-on: ${{ format('{0}-latest', matrix.os) }} # "-latest" is added here so we can use OS in the format expected by CodeCov

strategy:
matrix:
os: [ubuntu, macos]

steps:
- uses: actions/checkout@v4
- name: Setup Nox
uses: fjwillemsen/setup-nox2@v3.0.0
- name: Setup Poetry
uses: Gr1N/setup-poetry@v8
- name: Run tests with Nox
run: |
pip install nox-poetry
nox -- skip-gpu
# - name: Upload Coverage report to CodeCov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage
# os: ${{ matrix.os }}
# fail_ci_if_error: false # option to Specify if CI pipeline should fail when Codecov runs into errors during upload
Loading