-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dev version * adding DictState * run ci on dev-latest branch * DictState doesn't need objclass * allow Agent and Environment to be created without all models * policy model can be optional upon init for Agent * add test for setting model for agent * test agent env set model * black * option function names noun to verb * oops word correction * hashable frozen weighted particles * add the frozen property * remove spurious argument * refactor pouct _search to be easier for overriding * black * comment correction * type fix. time.time returns a double * remove spurious argument for pomcp * additional attributes * det_dict_hash without sorting * add frozen * one more attr * rollout policy should default to none * one more property * pbar * adding release script * Update scripts/README.md - remove image * include pomdp-solve in manifest * properly deal with build version while on dev-latest * script doesn't need an argument * include pomdp-solve binary when building pomdp-py * version should match convention * regenerate manifest * do not build thirdparty binary into wheel * restore setup.py * build wheel workflow * typo fix * workflow fix * release script no arg * print current branch for debugging * fix typo * non interactive and non sudo for github action friendly * no sudo chown * testing wheel release with action-gh-release * trigger for wheel build should be tag * release name in workflow * be real now - workflow works! * rocksample minor refactor for importability * make half_efficiency_dist tunable in rocksample * add py3.12 to matrix for package ci * attempt count for more robust twine pypi push * pypi deployment workflow attempt * oops * remove unneeded * forgot id-token * try test pypi token; skip pip install ask * verbose * dramatic test * comment out all secrets for now * use variable * vars * revert; now we may be ready * attempt count shows up later * fix attempt name * fix fix * one more attempt * this should do it? * oops, wrong place * ok good now. only run the deployment action when tagging * release artifact at the end * workflow syntax fix * simplify * fix * release art * remove unnecessary readme file * changelog rst * black --------- Co-authored-by: Kaiyu Zheng <[email protected]>
- Loading branch information
1 parent
719a957
commit 129ff98
Showing
23 changed files
with
551 additions
and
134 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,45 @@ | ||
name: pomdp-py build dev-latest wheel | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'vdev-latest' # trigger on the tag vdev-latest | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
|
||
- name: Set release name with date | ||
id: set_release_name | ||
run: echo "RELEASE_NAME=pomdp-py (dev-latest $(date +'%Y-%m-%d'))" >> $GITHUB_ENV | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: 'dev-latest' | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Run release script | ||
working-directory: . | ||
run: | | ||
cd scripts | ||
./pomdp_py_release.sh | ||
- name: Release artifact | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: ${{ env.RELEASE_NAME }} | ||
files: dist/*.whl |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
|
||
- dev-latest | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
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,74 @@ | ||
name: pomdp-py package pypi deployment | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pypi-publish: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/pomdp-py/ | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Set Variables | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | # Run the command within a multiline string | ||
echo "VERSION=\"Version ${{ github.ref_name }}\"" >> $GITHUB_ENV | ||
echo "TRIGGER_FOR_TEST_PYPI=${{ github.ref == 'refs/tags/vdev-latest' }}" >> $GITHUB_ENV | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: 'dev-latest' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Run release script | ||
working-directory: . | ||
run: | | ||
cd scripts | ||
./pomdp_py_release.sh ${{ vars.RELEASE_ATTEMPT_COUNT }} | ||
- name: Upload to Test PyPi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: ${{ env.TRIGGER_FOR_TEST_PYPI }} | ||
with: | ||
# This will upload stuff under dist/ to PyPI | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip-existing: true | ||
|
||
- name: Upload to PyPi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: ${{ ! env.TRIGGER_FOR_TEST_PYPI }} | ||
with: | ||
# This will upload stuff under dist/ to PyPI | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip-existing: true | ||
|
||
- name: Release artifact | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: ${{ env.VERSION }} | ||
files: dist/*.whl |
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,26 +1,27 @@ | ||
include ./pomdp_py/utils/cython_utils.pxd | ||
include ./pomdp_py/algorithms/po_uct.pxd | ||
include ./pomdp_py/algorithms/po_rollout.pxd | ||
include ./pomdp_py/algorithms/pomcp.pxd | ||
include ./pomdp_py/algorithms/value_iteration.pxd | ||
include ./pomdp_py/representations/belief/particles.pxd | ||
include ./pomdp_py/representations/distribution/particles.pxd | ||
include ./pomdp_py/representations/distribution/gaussian.pxd | ||
include ./pomdp_py/representations/distribution/histogram.pxd | ||
include ./pomdp_py/representations/distribution/gaussian.pxd | ||
include ./pomdp_py/representations/belief/particles.pxd | ||
include ./pomdp_py/utils/cython_utils.pxd | ||
include ./pomdp_py/framework/oopomdp.pxd | ||
include ./pomdp_py/framework/planner.pxd | ||
include ./pomdp_py/framework/basics.pxd | ||
include ./pomdp_py/framework/oopomdp.pxd | ||
include ./pomdp_py/utils/cython_utils.pyx | ||
include ./pomdp_py/algorithms/po_rollout.pxd | ||
include ./pomdp_py/algorithms/pomcp.pxd | ||
include ./pomdp_py/algorithms/po_uct.pxd | ||
include ./pomdp_py/algorithms/value_iteration.pxd | ||
include ./pomdp_py/problems/rocksample/cythonize/rocksample_problem.pyx | ||
include ./pomdp_py/problems/tiger/cythonize/tiger_problem.pyx | ||
include ./pomdp_py/algorithms/value_iteration.pyx | ||
include ./pomdp_py/algorithms/pomcp.pyx | ||
include ./pomdp_py/algorithms/po_rollout.pyx | ||
include ./pomdp_py/algorithms/po_uct.pyx | ||
include ./pomdp_py/representations/belief/particles.pyx | ||
include ./pomdp_py/representations/distribution/particles.pyx | ||
include ./pomdp_py/representations/distribution/histogram.pyx | ||
include ./pomdp_py/representations/distribution/gaussian.pyx | ||
include ./pomdp_py/framework/basics.pyx | ||
include ./pomdp_py/representations/distribution/particles.pyx | ||
include ./pomdp_py/representations/belief/particles.pyx | ||
include ./pomdp_py/utils/cython_utils.pyx | ||
include ./pomdp_py/framework/planner.pyx | ||
include ./pomdp_py/framework/basics.pyx | ||
include ./pomdp_py/framework/oopomdp.pyx | ||
include ./pomdp_py/algorithms/po_rollout.pyx | ||
include ./pomdp_py/algorithms/value_iteration.pyx | ||
include ./pomdp_py/algorithms/pomcp.pyx | ||
include ./pomdp_py/algorithms/po_uct.pyx | ||
include ./thirdparty/pomdp-solve/src/pomdp-solve |
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
Oops, something went wrong.