-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #191 from kiudee/pytorch-migration
Migrate to PyTorch
- Loading branch information
Showing
114 changed files
with
3,686 additions
and
10,869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# .github/workflows/release.yml | ||
name: Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.8' | ||
architecture: x64 | ||
- run: pip install nox==2020.12.31 | ||
- run: pip install nox-poetry==0.8.4 | ||
- run: pip install poetry==1.1.4 | ||
- run: nox | ||
- run: poetry build | ||
- run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Tests | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
tests: | ||
runs-on: "${{ matrix.os }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { python-version: 3.8, os: ubuntu-latest, session: "pre-commit" } | ||
- { python-version: 3.8, os: ubuntu-latest, session: "tests" } | ||
- { python-version: 3.8, os: ubuntu-latest, session: "docs-build" } | ||
|
||
name: "${{ matrix.session }} ${{ matrix.python-version }} / ${{ matrix.os }}" | ||
env: | ||
NOXSESSION: "${{ matrix.session }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- run: pip install nox==2020.12.31 | ||
- run: pip install nox-poetry==0.8.4 | ||
- run: pip install poetry==1.1.4 | ||
- name: Compute pre-commit cache key | ||
if: matrix.session == 'pre-commit' | ||
id: pre-commit-cache | ||
shell: python | ||
run: | | ||
import hashlib | ||
import sys | ||
python = "py{}.{}".format(*sys.version_info[:2]) | ||
payload = sys.version.encode() + sys.executable.encode() | ||
digest = hashlib.sha256(payload).hexdigest() | ||
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8]) | ||
print("::set-output name=result::{}".format(result)) | ||
- name: Restore pre-commit cache | ||
uses: actions/[email protected] | ||
if: matrix.session == 'pre-commit' | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: "${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}" | ||
restore-keys: | | ||
"${{ steps.pre-commit-cache.outputs.result }}-" | ||
- name: Run Nox | ||
run: | | ||
nox --force-color --python=${{ matrix.python-version }} | ||
- name: Upload coverage data | ||
if: always() && matrix.session == 'tests' | ||
uses: "actions/[email protected]" | ||
with: | ||
name: coverage-data | ||
path: ".coverage.*" | ||
|
||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.8 | ||
|
||
- run: pip install nox==2020.12.31 | ||
- run: pip install nox-poetry==0.8.4 | ||
- run: pip install poetry==1.1.4 | ||
|
||
- name: Download coverage data | ||
uses: actions/[email protected] | ||
with: | ||
name: coverage-data | ||
|
||
- name: Combine coverage data and display human readable report | ||
run: | | ||
nox --force-color --session=coverage | ||
- name: Create coverage report | ||
run: | | ||
nox --force-color --session=coverage -- xml | ||
- name: Upload coverage report | ||
uses: codecov/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ sphinx: | |
configuration: docs/conf.py | ||
|
||
python: | ||
version: 3.7 | ||
version: 3.8 | ||
install: | ||
- method: pip | ||
path: . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
__version__ = "1.2.1" | ||
|
||
# We should re-evaluate if we really want to re-export everything here and then | ||
# use __all__ properly. | ||
from importlib.metadata import version | ||
|
||
from .choicefunction import * # noqa | ||
from .core import * # noqa | ||
from .dataset_reader import * # noqa | ||
from .discretechoice import * # noqa | ||
from .objectranking import * # noqa | ||
|
||
# We should re-evaluate if we really want to re-export everything here and then | ||
# use __all__ properly. | ||
|
||
__version__ = version(__name__) |
Oops, something went wrong.