mirror of
https://github.com/jung-geun/PSO.git
synced 2026-09-20 14:11:48 +09:00
feat: modernize PSO and add convergence research
Migrate the package and examples to the tensor-native PyTorch implementation, add benchmark evidence, and add the guarded post-training convergence protocol with TensorBoard progress monitoring and hash-verified recovery. Constraint: Preserve one-shot official-test sealing and auditable research artifacts Rejected: Commit local .omc runs and downloaded datasets | multi-gigabyte runtime state is machine-local Confidence: high Scope-risk: broad Not-tested: Production CUDA run on pieroot-server
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
name: Release Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get Version
|
||||
run: echo "##[set-output name=version;]$(echo '${{ github.event.head_commit.message }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
|
||||
id: extract_version_name
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.extract_version_name.outputs.version }}
|
||||
release_name: Release ${{ steps.extract_version_name.outputs.version }}
|
||||
body: |
|
||||
Release ${{ steps.extract_version_name.outputs.version }}
|
||||
+40
-23
@@ -1,38 +1,55 @@
|
||||
name: PyPI package
|
||||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "setup.py"
|
||||
- "pso/__init__.py"
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
max-parallel: 5
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10", "3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install uv and Python ${{ matrix.python-version }}
|
||||
uses: astral-sh/setup-uv@v9
|
||||
with:
|
||||
version: "0.12.7"
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
pip install setuptools wheel twine
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
run: |
|
||||
python setup.py bdist_wheel sdist
|
||||
twine upload dist/*.whl dist/*.tar.gz
|
||||
enable-cache: true
|
||||
- name: Sync dependencies
|
||||
run: uv sync --locked --group dev
|
||||
- name: Run tests
|
||||
run: uv run --no-sync pytest -q
|
||||
- name: Build package
|
||||
run: uv build
|
||||
- name: Check package distribution
|
||||
run: uv run --no-sync twine check dist/*
|
||||
|
||||
publish:
|
||||
needs: test
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install uv and Python 3.11
|
||||
uses: astral-sh/setup-uv@v9
|
||||
with:
|
||||
version: "0.12.7"
|
||||
python-version: "3.11"
|
||||
enable-cache: true
|
||||
- name: Sync dependencies
|
||||
run: uv sync --locked --group dev
|
||||
- name: Build package
|
||||
run: uv build
|
||||
- name: Check package distribution
|
||||
run: uv run --no-sync twine check dist/*
|
||||
- name: Publish package to PyPI
|
||||
uses: pypa/gh-action-pypa-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_TOKEN }}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
name: Python Package using Conda
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
max-parallel: 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- name: Add conda to system path
|
||||
run: |
|
||||
# $CONDA is an environment variable pointing to the root of the miniconda directory
|
||||
echo $CONDA/bin >> $GITHUB_PATH
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
conda env create --file conda_env/environment.yaml --name pso
|
||||
conda activate pso
|
||||
python mnist.py
|
||||
@@ -0,0 +1,41 @@
|
||||
name: Python package test
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "pso/**"
|
||||
- "pyproject.toml"
|
||||
- "uv.lock"
|
||||
- ".python-version"
|
||||
- "README.md"
|
||||
- "tests/**"
|
||||
- ".github/workflows/python-package.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "pso/**"
|
||||
- "pyproject.toml"
|
||||
- "uv.lock"
|
||||
- ".python-version"
|
||||
- "README.md"
|
||||
- "tests/**"
|
||||
- ".github/workflows/python-package.yml"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install uv and Python ${{ matrix.python-version }}
|
||||
uses: astral-sh/setup-uv@v9
|
||||
with:
|
||||
version: "0.12.7"
|
||||
python-version: ${{ matrix.python-version }}
|
||||
enable-cache: true
|
||||
- name: Sync dependencies
|
||||
run: uv sync --locked --group dev
|
||||
- name: Run tests
|
||||
run: uv run --no-sync pytest -q
|
||||
Reference in New Issue
Block a user