-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve 'eval_robustness' utility (#313)
This commit improves the 'eval_robustness' utility so that users no longer need to modify their environments to use it with this utility. The disturbers are now implemented as [gymnasium wrappers](https://gymnasium.farama.org/api/wrappers/). Because of this, they can be used with any [gymnasium environment](https://gymnasium.farama.org/). If you want to add a new disturber, you only have to ensure that it is a Python class that inherits from the [gym.Wrapper](https://github.com/Farama-Foundation/Gymnasium/blob/ba348890af369dad6e6093665fd4e54d8d4b4824/gymnasium/core.py#L246-L249) class.
- Loading branch information
Showing
43 changed files
with
2,537 additions
and
1,718 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
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,59 +1,20 @@ | ||
# Makefile for Stable Learning Control Sphinx documentation | ||
# Makefile for Stable Learnig Control Sphinx documentation. | ||
|
||
# You can set these variables from the command line | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = Stable Learning Control | ||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
GH_PAGES_SOURCES = docs stable_learning_control examples | ||
|
||
# User-friendly check for sphinx-build | ||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) | ||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/) | ||
endif | ||
GH_PAGES_SOURCES = stable_learning_control | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
.PHONY: help Makefile | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
# Create make clean command | ||
.PHONY: clean | ||
clean: | ||
@rm -rf $(BUILDDIR)/* | ||
@rm -rf $(SOURCEDIR)/dev/api/_autosummary | ||
@echo "Build folder cleaned" | ||
|
||
# Publish gh-pages command | ||
.PHONY: gh-pages | ||
gh-pages: | ||
cd .. && \ | ||
git submodule update --recursive && \ | ||
git checkout gh-pages && \ | ||
git rm -rf . && git clean -fxd && \ | ||
git checkout main $(GH_PAGES_SOURCES) && \ | ||
git reset HEAD && \ | ||
cd docs && \ | ||
make clean && \ | ||
make html && \ | ||
cd .. && \ | ||
git add docs/build/html && \ | ||
git clean -ffxd && \ | ||
mv -fv docs/build/html/* ./ && \ | ||
mv -fv docs/build/html/.[!.]* ./ && \ | ||
rm -rf $(GH_PAGES_SOURCES) && \ | ||
git add -A && \ | ||
git commit -m "docs: Generated gh-pages for `git log main -1 --pretty=short --abbrev-commit`" && \ | ||
git push origin gh-pages && \ | ||
git checkout main && \ | ||
git submodule update --recursive && \ | ||
pnpm install && \ | ||
pnpm run prepare && \ | ||
git restore pnpm-lock.yaml | ||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
git submodule update --init --recursive | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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
Oops, something went wrong.