Add benchmark environments#338
Merged
Merged
Conversation
f4e79b1 to
dfae80a
Compare
There was a problem hiding this comment.
Pull request overview
Adds a lightweight benchmark harness (env templates + a Ray RLlib PPO training entrypoint) to support repeatable training runs against specific benchmark environments, and fixes a Basilisk support-data path fallback bug.
Changes:
- Fix Basilisk
dataFetcherImportError fallback path variable naming inWorldModelsetup. - Add
benchmarks/train.pyRLlib PPO training script with checkpointing and dynamic benchmark loading. - Add a first benchmark environment (
nadir_science) plus a smallBenchmarkdataclass template.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/bsk_rl/sim/world.py |
Fixes fallback Basilisk path variable used when dataFetcher API is unavailable. |
benchmarks/train.py |
New RLlib PPO training/continue script for benchmark runs (checkpoint mgmt, dynamic env import). |
benchmarks/nadir_science.py |
Defines a benchmark environment configuration (satellite model + env/training args). |
benchmarks/env_template.py |
Introduces a simple Benchmark dataclass container for env/training configuration. |
Comments suppressed due to low confidence (2)
benchmarks/train.py:359
- The script initializes Ray and a PPO algorithm but never calls
ppo.stop()/ray.shutdown()before exiting. This can leave worker processes running (especially in interactive or repeated benchmark runs) and can hold onto temp dirs/object store resources. Consider adding atry/finallyaround training to ensure cleanup.
benchmarks/nadir_science.py:133 - These
print(...)statements will execute at import time, which is noisy when using the dynamic import inbenchmarks/train.pyand makes it harder to use these benchmarks as a library. Consider removing them or switching to logging guarded byif __name__ == "__main__"/ a verbosity flag.
training_args = dict(
lr=3e-5,
gamma=0.999,
train_batch_size=1000,
num_sgd_iter=10,
use_kl_loss=False,
clip_param=0.1,
grad_clip=0.5,
)
nadir_science_benchmark = Benchmark(
env_args=env_args,
policies=policies,
policy_mapping_fn=policy_mapping_fn,
module_specs=module_specs,
training_args=training_args,
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5828acc to
ed7c2ff
Compare
Mark2000
added a commit
that referenced
this pull request
May 19, 2026
7788f2e to
abe870e
Compare
Mark2000
added a commit
that referenced
this pull request
May 19, 2026
abe870e to
bddd388
Compare
Mark2000
added a commit
that referenced
this pull request
May 19, 2026
bddd388 to
a26b102
Compare
Mark2000
added a commit
that referenced
this pull request
May 19, 2026
a26b102 to
e2033bd
Compare
Mark2000
added a commit
that referenced
this pull request
May 19, 2026
e2033bd to
80a7101
Compare
Mark2000
added a commit
that referenced
this pull request
May 19, 2026
f89a0f0 to
0282dce
Compare
2d543dc to
243b457
Compare
Mark2000
added a commit
that referenced
this pull request
May 19, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #339
Adds benchmark environments. Run with:
Type of change
How should this pull request be reviewed?
Future Work
Test benchmarks automatically: #340
Checklist