Welcome to rscope!
A light-weight package to collect and interactively visualize trajectories while training Mujoco Playground environments. Rscope can visualize both local and remote (potentially headless) training runs.
Installation
pip install rscope
Usage
Local training runs
To visualize locally stored rollouts:
python -m rscope
Remote training runs
Below, update user@remote_host, for example alice@168.42.4.8.
First, set up password-free key-based SSH connection with the remote device:
ssh-keygen -t ed25519 -f ~/.ssh/rsync_key -N ""
ssh-copy-id -i ~/.ssh/rsync_key.pub user@remote_host
If this worked, you should be able to ssh in without using a password:
ssh -i ~/.ssh/rsync_key user@remote_host
echo hello
exit
To visualize rollouts stored on a remote server via SSH:
python -m rscope --ssh_to user@remote_host[:port] --ssh_key ~/.ssh/rsync_key --polling_interval 5 # port defaults to 22
Features
- Most features from Mujoco viewer
- Browse through trajectories. Use left/right arrow keys to switch through parallel environments and up/down for recent/past trajectories.
- Live Plotting. Use
SHIFT+Mto plot trajectory rewards and the contents ofstate.metrics, up to the first 11 keys. - Pixel Observations. Use
SHIFT+Oto overlay pixel observations if available. To use this feature, the observation must be adictand the pixel keys must be prefixed withpixels/.
Sharp bits
Some background on how rscope works: between policy updates, rscope unrolls multiple trajectories in parallel then visualizes them on CPU. While this is simpler to implement and less expensive than tracing training runs like in IsaacLab, this and other implementation details lead to some unexpected gotchas:
- Typically, stochastic policies are used for evaluating training progress while determinsitic ones are deployed. While you can use rscope on stochastic policies to get a feel for the agent's training exploration, we recommend deterministic evals.
- Renders incorrectly for domain-randomized training because the loaded assets are from the nominal model definition.
- Plots only the first 14 keys in the metrics without filtering for shaping rewards.
- Visualizes only the first 14 pixel observations.
- Cannot capture curriculum progression during training, as curriculums depend on
state.info, which is reset at the start of an evaluator run. - Currently supports only PPO-based training.
Contribution Guidelines:
Please run the following before making a PR:
pip install -e ".[dev]"
pre-commit install
pre-commit run --all-files
Metadata
Release files for rscope 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rscope-0.0.8.tar.gz | 19.2 kB | Without provenance | Details for rscope-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rscope-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for rscope-0.0.8-py3-none-any.whl |
Total release size: 44.6 kB
Release files / rscope-0.0.8.tar.gz
| Download URL | rscope-0.0.8.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9c47a2339d8f297afafc20bd40c82e4e6f224e5aa1224c71773b154915398fc
|
|
BLAKE2b-256 checksum How to use checksums |
f5c553157b6de27db05204c2be5ca5d1174409227aea75cd26e4c992fc40f6fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Release files / rscope-0.0.8-py3-none-any.whl
| Download URL | rscope-0.0.8-py3-none-any.whl |
|---|---|
| Size | 25.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f179f9f18418e17fe655e358953d04e70dd494d5a88d00b615e9910942e87c2
|
|
BLAKE2b-256 checksum How to use checksums |
958e73c9423b5f19d8a05e894f6c3d1e599cd4a66c617b5a72cdbce08332fd7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Security for rscope 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.