Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
niki committed Feb 16, 2024
2 parents b34644b + 6f2133e commit f613064
Show file tree
Hide file tree
Showing 38 changed files with 833 additions and 5,152 deletions.
1 change: 0 additions & 1 deletion .Rprofile

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Pytest unit/integration

on:
pull_request:
push:
branches:
- main

# Use bash by default in all jobs
defaults:
run:
shell: bash

jobs:
build-test:
name: Test Run (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
# os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install nox
- name: List installed packages
run: pip list
- name: Run tests with pytest & nox
run: |
nox -s test-${{ matrix.python-version }}
# Codecov is only free for open source / public repos. Not really needed anyway
# - name: Upload coverage to Codecov
# if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'}}
# uses: codecov/codecov-action@v3

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,8 @@ dmypy.json
# cache
venv/
*.gz
*.zip

manuscript/*.pdf


manuscript/*.pdf
15 changes: 0 additions & 15 deletions approx-model-or-approx-soln.Rproj

This file was deleted.

11 changes: 11 additions & 0 deletions hyperpars/ppo-caribou-v0-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# stable-baselines3 configuration

algo: "PPO"
env_id: "Caribou-v0"
n_envs: 12
tensorboard: "/home/rstudio/logs"
total_timesteps: 6000000
config: {}
use_sde: True
id: "1"
repo: "cboettig/rl-ecology"
30 changes: 30 additions & 0 deletions hyperpars/rllib/ppo-asm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
asm:
env: rl4fisheries.asm.Asm
run: PPO
stop:
time_total_s: 24000
config:
lambda: 0.95
kl_coeff: 0.5
clip_param: 0.2
vf_clip_param: 400.0
entropy_coeff: 0.0001
rollout_fragment_length: auto
num_sgd_iter: 10
num_envs_per_worker: 24
min_time_s_per_iteration: 360
lr: 0.0003

# Run with Learner- and RLModule API (new stack).
_enable_learner_api: true
_enable_rl_module_api: true
# Use N Learner worker on the GPU
num_learner_workers: 2
num_gpus_per_learner_worker: 1
num_gpus: 0 # No GPU needed for driver.
# Since we are using learner workers, the driver process does not need
# a CPU in particular.
num_cpus_for_local_worker: 1
# Need to unset this b/c we are using the RLModule API, which
# provides exploration control via the RLModule's `forward_exploration` method.
exploration_config: {}
11 changes: 11 additions & 0 deletions hyperpars/tqc-caribou-v0-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# stable-baselines3 configuration

algo: "TQC"
env_id: "Caribou-v0"
n_envs: 12
tensorboard: "/home/rstudio/logs"
total_timesteps: 6000000
config: {}
use_sde: True
id: "1"
repo: "cboettig/rl-ecology"
209 changes: 209 additions & 0 deletions notebooks/compare-solutions.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit f613064

Please sign in to comment.