-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial soft prompt example for stage 3 trlx (#14) * initial softprompt example for stage 3 trlx * clean up * basic runnable changes after trlx pr merge * softprompt prefix padding handling, whole model freezing, cleanup * new toy tasks, restored config register, plot softprompt drift * fix import * minor fixes, +orchestrator to handle softprompt padding * update for new trlx version * fix(sandbox): build typo and updating lock file (#26) * Fix dependency for box2d; Moved graphviz stuff to optional. (#27) * update and cleanup for latest trlx, clarity * bugfix: override get_model_inputs with softprompt support * additional comments, sanity checks * update configs and example scripts * init readme for trlx softprompt tuning setup * formatting * fix filename typo Co-authored-by: Francisco Carvalho <[email protected]> Co-authored-by: Honglu Fan <[email protected]> * Diff processing and evaluations (#29) * fix(sandbox): build typo and updating lock file (#26) * Fix dependency for box2d; Moved graphviz stuff to optional. (#27) * Added a few diff util functions and tests; Added pytest to CI; Added box2d-py (for pytest to pass) and requests to requirements.txt. * fix pytest. * ugh, dependency... * fix typo... (ugh probably drank too much) * fix dependency. * added torch to requirements.txt * Expose `Genotype` and `BaseEnvironment` for others to inherit. * Use `checkpoints_dir` in the config instead of hardcoding "checkpoints". * Fix small bug in ImageOptim mutate. * Modified benchmark config; Added diff benchmark script; Completed verify_diff and added tests. * Fixed minor issues on device and invalid format. * Force `.use_cache` to be True. * Rename `elm.py` into `elm_main.py` to avoid conflicts in import. * Minor changes according to review; Added `DiffState` to represent the validity of diff data sample. * Fix CI. * Box2d CI bug again! Trying a hot-fix... * Another try on swig version. * Another try on swig version. * Seriously?? What about revert back. * Ok, trying again with different install order... Co-authored-by: Francisco Carvalho <[email protected]> * Fix requirements * Add sodarace tests * fix ADDFILE line count verification. * Add docs with Sphinx * Fix readthedocs syntax * Fix rtd build * Fix rtd build (for real this time) * Rename elm to openelm * Rename util * Linting * Revert "Linting" This reverts commit 8db8623. * Linting utils * Add docstrings to some files * Add Sphinx autodoc specification * Rename benchmark_diff * Improve Sphinx docstrings Co-authored-by: Andrew <[email protected]> Co-authored-by: Francisco Carvalho <[email protected]> Co-authored-by: Honglu Fan <[email protected]> Co-authored-by: Honglu Fan <[email protected]>
- Loading branch information
1 parent
ef4a7ce
commit b6b2baa
Showing
92 changed files
with
2,529 additions
and
383 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Remove report submodule from docs build | ||
submodules: | ||
exclude: all | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.9" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF | ||
# formats: | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# 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 | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.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 | ||
@$(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
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,13 @@ | ||
sphinx==5.3.0 | ||
sphinx_rtd_theme | ||
sphinx_autodoc_typehints | ||
hydra-core>=1.2.0 | ||
wandb>=0.13 | ||
numpy | ||
torch>=1.10 | ||
transformers>=4.22.0 | ||
tokenizers | ||
swig>=4.1.0 | ||
box2d-py==2.3.8 | ||
requests | ||
Flask |
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,71 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
import os | ||
import sys | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
import sphinx_rtd_theme # noqa: F401 | ||
|
||
sys.path.insert(0, os.path.abspath("..")) | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = "OpenELM" | ||
copyright = "2022, CarperAI" | ||
author = "CarperAI" | ||
release = "0.1.0" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
|
||
|
||
extensions = [ | ||
"sphinx_rtd_theme", | ||
"sphinx.ext.todo", | ||
"sphinx.ext.viewcode", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.autosectionlabel", | ||
"sphinx_autodoc_typehints", | ||
] | ||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ["_templates"] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ["tests", "logs", "archive", "checkpoints"] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
html_theme = "sphinx_rtd_theme" | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ["_static"] | ||
|
||
html_theme_options = { | ||
"logo_only": True, | ||
"display_version": True, | ||
} | ||
|
||
html_favicon = "images/openelm_favicon.ico" |
Binary file not shown.
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,21 @@ | ||
.. OpenELM documentation master file, created by | ||
sphinx-quickstart on Fri Dec 23 14:05:09 2022. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to OpenELM's documentation! | ||
=================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
openelm | ||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
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,14 @@ | ||
openelm.codegen package | ||
======================== | ||
|
||
Submodules | ||
------------------------------------------- | ||
|
||
Module contents | ||
------------------------------------------- | ||
|
||
.. automodule:: openelm.codegen | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ |
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,23 @@ | ||
openelm.environments package | ||
============================= | ||
|
||
Submodules | ||
-------------------------------------- | ||
|
||
openelm.environments.environments module | ||
------------------------------------------- | ||
|
||
.. automodule:: openelm.environments.environments | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ | ||
|
||
Module contents | ||
-------------------------------------- | ||
|
||
.. automodule:: openelm.environments | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ |
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,59 @@ | ||
OpenELM API Reference | ||
====================== | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
openelm.environments | ||
openelm.codegen | ||
|
||
Submodules | ||
---------- | ||
|
||
openelm.elm module | ||
----------------------------------------- | ||
|
||
.. automodule:: openelm.elm | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ | ||
|
||
openelm.map_elites module | ||
----------------------------------------- | ||
|
||
.. automodule:: openelm.map_elites | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ | ||
|
||
openelm.diff_model module | ||
----------------------------------------- | ||
|
||
.. automodule:: openelm.diff_model | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ | ||
|
||
openelm.benchmarks module | ||
----------------------------------------- | ||
|
||
.. automodule:: openelm.benchmarks | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ | ||
|
||
Module contents | ||
----------------------------------------- | ||
|
||
.. automodule:: openelm | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:special-members: __init__ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.