Skip to content

Reduce memory leaked by using model() instead of model.predict() #14

Reduce memory leaked by using model() instead of model.predict()

Reduce memory leaked by using model() instead of model.predict() #14

Workflow file for this run

name: Build and release packages
on:
pull_request:
push:
tags:
- "*"
jobs:
# Build the source distribution for PyPI
build_packages:
name: Build packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Build
run: |
python3 -m pip install --upgrade build
python3 -m build
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
# Create a GitHub release
github_release:
name: Create GitHub release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: [build_packages]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: "✏️ Generate release changelog"
id: changelog
uses: heinrichreimer/[email protected]
with:
filterByMilestone: false
onlyLastTag: true
pullRequests: true
prWoLabels: true
token: ${{ secrets.GITHUB_TOKEN }}
verbose: true
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.changelog }}
files: dist/**/*
# Test PyPI
test_pypi_publish:
name: Test publishing to PyPI
needs: [build_packages]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
# Publish to PyPI
pypi_publish:
name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: [build_packages]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
print_hash: true