-
Notifications
You must be signed in to change notification settings - Fork 2k
Add configs and adapt exporter for RSL-RL distillation #2182
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
Merged
Merged
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0a0450d
sets device to local rank
Mayankm96 c106c32
adds rsl-rl multi-gpu to docs
Mayankm96 d0180dc
fixes for rsl-rl library
Mayankm96 b5a634f
hard fixes to version of rsl-rl
Mayankm96 762d496
adds other cfgs for rnd and symmetry
Mayankm96 efe635f
runs formatter
Mayankm96 da06bd5
updates changelog
Mayankm96 67f3c11
runs formatter
Mayankm96 71a8fe5
fixes expectation of symm function
Mayankm96 67be285
adds more description on symmetry
Mayankm96 485e1a0
adds more docs
Mayankm96 9c3d9d4
updates benchmark script as well
Mayankm96 83a59fc
updates feature table
Mayankm96 99d89ea
adds version check
Mayankm96 b744d6a
add configs and adapt exporter for distillation
ClemensSchwarke 281c71f
remove resume argument for better distillation workflow
ClemensSchwarke 2671598
add me to contributors
ClemensSchwarke 9d14bee
Merge branch 'main' into feature/rsl_rl_2_3_0_adaptation
Mayankm96 63805aa
Revert "remove resume argument for better distillation workflow"
ClemensSchwarke b91ce9f
remove need for resume flag when training distillation
ClemensSchwarke a7f5366
separate configs
ClemensSchwarke 4ac6433
restructure exporter
ClemensSchwarke a172702
Apply suggestions from code review
Mayankm96 35b0d84
updates version
Mayankm96 8b9a1e1
makes scripts backwards compatible
Mayankm96 d208670
bumps rsl-rl version
Mayankm96 10ec3ec
fixes typo
Mayankm96 5479358
Merge branch 'main' into feature/rsl_rl_2_3_0_adaptation
Mayankm96 2041684
fixes extension toml
Mayankm96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,80 @@ | ||||||||||||
# Copyright (c) 2022-2025, The Isaac Lab Project Developers. | ||||||||||||
# All rights reserved. | ||||||||||||
# | ||||||||||||
# SPDX-License-Identifier: BSD-3-Clause | ||||||||||||
|
||||||||||||
from __future__ import annotations | ||||||||||||
|
||||||||||||
from dataclasses import MISSING | ||||||||||||
from typing import Literal | ||||||||||||
|
||||||||||||
from isaaclab.utils import configclass | ||||||||||||
|
||||||||||||
######################### | ||||||||||||
# Policy configurations # | ||||||||||||
######################### | ||||||||||||
|
||||||||||||
|
||||||||||||
@configclass | ||||||||||||
class RslRlDistillationStudentTeacherCfg: | ||||||||||||
"""Configuration for the distillation student-teacher networks.""" | ||||||||||||
|
||||||||||||
class_name: str = "StudentTeacher" | ||||||||||||
"""The policy class name. Default is StudentTeacher.""" | ||||||||||||
|
||||||||||||
init_noise_std: float = MISSING | ||||||||||||
"""The initial noise standard deviation for the student policy.""" | ||||||||||||
|
||||||||||||
noise_std_type: Literal["scalar", "log"] = "scalar" | ||||||||||||
"""The type of noise standard deviation for the policy. Default is scalar.""" | ||||||||||||
|
||||||||||||
student_hidden_dims: list[int] = MISSING | ||||||||||||
"""The hidden dimensions of the student network.""" | ||||||||||||
|
||||||||||||
teacher_hidden_dims: list[int] = MISSING | ||||||||||||
"""The hidden dimensions of the teacher network.""" | ||||||||||||
|
||||||||||||
activation: str = MISSING | ||||||||||||
"""The activation function for the student and teacher networks.""" | ||||||||||||
|
||||||||||||
|
||||||||||||
@configclass | ||||||||||||
class RslRlDistillationStudentTeacherRecurrentCfg(RslRlDistillationStudentTeacherCfg): | ||||||||||||
"""Configuration for the distillation student-teacher recurrent networks.""" | ||||||||||||
|
||||||||||||
class_name: str = "StudentTeacherRecurrent" | ||||||||||||
"""The policy class name. Default is StudentTeacherRecurrent.""" | ||||||||||||
|
||||||||||||
rnn_type: str = MISSING | ||||||||||||
"""The type of the RNN network. Either "lstm" or "gru".""" | ||||||||||||
|
||||||||||||
rnn_hidden_dim: int = MISSING | ||||||||||||
"""The hidden dimension of the RNN network.""" | ||||||||||||
|
||||||||||||
rnn_num_layers: int = MISSING | ||||||||||||
"""The number of layers of the RNN network.""" | ||||||||||||
|
||||||||||||
teacher_recurrent: bool = MISSING | ||||||||||||
"""Whether the teacher network is recurrent too.""" | ||||||||||||
|
||||||||||||
|
||||||||||||
############################ | ||||||||||||
# Algorithm configurations # | ||||||||||||
############################ | ||||||||||||
|
||||||||||||
|
||||||||||||
@configclass | ||||||||||||
class RslRlDistillationAlgorithmCfg: | ||||||||||||
"""Configuration for the distillation algorithm.""" | ||||||||||||
|
||||||||||||
class_name: str = "Distillation" | ||||||||||||
"""The algorithm class name. Default is Distillation.""" | ||||||||||||
|
||||||||||||
num_learning_epochs: int = MISSING | ||||||||||||
"""The number of updates performed with each sample.""" | ||||||||||||
|
||||||||||||
learning_rate: float = MISSING | ||||||||||||
"""The learning rate for the student policy.""" | ||||||||||||
|
||||||||||||
gradient_length: float = MISSING | ||||||||||||
"""The number of environment steps the gradient flows back.""" | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ClemensSchwarke should the parameter by default be 1?
Suggested change
|
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.