Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support safe slac #324

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,15 @@ UpdateDynamics
mathbb
meger
Jupyter
LazyFrames
SLAC
Leibler
Kullback
slac
Tal
Nils
Simão
Hogewind
Yannick
Kachman
Thiago
3 changes: 1 addition & 2 deletions examples/evaluate_saved_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Just fill your experiment's log directory in here.
# Such as: ~/omnisafe/examples/runs/PPOLag-{SafetyPointGoal1-v0}/seed-000-2023-03-07-20-25-48
LOG_DIR = ''
LOG_DIR = '/home/jiayi/SLAC/omnisafe_zjy/examples/runs/SafeSLAC-{SafetyPointGoal1Vision-v0}/seed-000-2024-05-12-20-50-23'
if __name__ == '__main__':
evaluator = omnisafe.Evaluator(render_mode='rgb_array')
scan_dir = os.scandir(os.path.join(LOG_DIR, 'torch_save'))
Expand All @@ -34,6 +34,5 @@
width=256,
height=256,
)
evaluator.render(num_episodes=1)
evaluator.evaluate(num_episodes=1)
scan_dir.close()
1 change: 1 addition & 0 deletions omnisafe/adapter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from omnisafe.adapter.modelbased_adapter import ModelBasedAdapter
from omnisafe.adapter.offline_adapter import OfflineAdapter
from omnisafe.adapter.offpolicy_adapter import OffPolicyAdapter
from omnisafe.adapter.offpolicy_latent_adapter import OffPolicyLatentAdapter
from omnisafe.adapter.online_adapter import OnlineAdapter
from omnisafe.adapter.onpolicy_adapter import OnPolicyAdapter
from omnisafe.adapter.saute_adapter import SauteAdapter
Expand Down
Loading