-
Notifications
You must be signed in to change notification settings - Fork 126
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
chore: update ci #90
chore: update ci #90
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #90 +/- ##
======================================
Coverage ? 63.72%
======================================
Files ? 110
Lines ? 5863
Branches ? 0
======================================
Hits ? 3736
Misses ? 2127
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
omnisafe/utils/config_utils.py
Outdated
@@ -116,7 +116,10 @@ def check_all_configs(configs: NamedTuple, algo_type: str) -> None: | |||
configs (dict): configs to be checked. | |||
algo_type (str): algorithm type. | |||
""" | |||
check_env_configs(configs.env_cfgs, wrapper_type=configs.wrapper_type) | |||
# check_model_configs(configs.model_cfgs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why comment on this line
omnisafe/utils/vtrace.py
Outdated
|
||
|
||
# pylint: disable-next=too-many-arguments,too-many-locals | ||
# pylint: disable-next=too-many-arguments, too-many-locals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# pylint: disable-next=too-many-arguments, too-many-locals | |
# pylint: disable-next=too-many-arguments,too-many-locals |
tests/test_policy.py
Outdated
"""Test algorithms""" | ||
env_id = 'SafetyPointGoal1-v0' | ||
custom_cfgs = {'epochs': 1, 'steps_per_epoch': 2000, 'pi_iters': 1, 'critic_iters': 1} | ||
"""Test off policy algorithms""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test off policy algorithms""" | |
"""Test off policy algorithms.""" |
tests/test_policy.py
Outdated
|
||
@helpers.parametrize(algo=simmer_policy) | ||
def test_simmer_policy(algo): | ||
"""Test Simmer algorithms""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test Simmer algorithms""" | |
"""Test Simmer algorithms.""" |
) | ||
def test_on_policy(algo, agent_id, env_id, level): | ||
def test_safety_nvigation(algo, agent_id, env_id, level): | ||
"""Test environments""" | ||
env_id = 'Safety' + agent_id + env_id + level + '-v0' | ||
# env_id = 'PointGoal1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# env_id = 'PointGoal1' |
'env_cfgs': {'num_envs': 1}, | ||
} | ||
agent = omnisafe.Agent(algo, env_id, custom_cfgs=custom_cfgs, parallel=1) | ||
# agent.set_seed(seed=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# agent.set_seed(seed=0) |
def test_safety_velocity(algo, agent_id, env_id): | ||
"""Test environments""" | ||
env_id = 'Safety' + agent_id + env_id + '-v4' | ||
# env_id = 'PointGoal1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# env_id = 'PointGoal1' |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
"""Test Utils""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test Utils""" | |
"""Test Utils.""" |
tests/test_utils.py
Outdated
steps_per_epoch=1000, | ||
num_envs=1, | ||
): | ||
"""Test train""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test train""" | |
"""Test train.""" |
tests/test_utils.py
Outdated
|
||
|
||
def get_answer(gamma: float) -> torch.Tensor: | ||
"""Input gamma and return the answer""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Input gamma and return the answer""" | |
"""Input gamma and return the answer.""" |
tests/test_utils.py
Outdated
def test_discount_cumsum_torch( | ||
discount: float, | ||
): | ||
"""Test discount_cumsum_torch""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test discount_cumsum_torch""" | |
"""Test discount_cumsum_torch.""" |
tests/test_utils.py
Outdated
|
||
|
||
def test_distributed_tools(): | ||
"""Test mpi_fork""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test mpi_fork""" | |
"""Test mpi_fork.""" |
tests/test_utils.py
Outdated
|
||
@helpers.parametrize(item=[1, 1.0, [1, 2, 3], (1, 2, 3), {'a': 1, 'b': 2}, torch.tensor([1, 2, 3])]) | ||
def test_to_ndarray(item): | ||
"""Test to_ndarray""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test to_ndarray""" | |
"""Test to_ndarray.""" |
@@ -14,32 +14,39 @@ | |||
# ============================================================================== | |||
"""Test models""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Test models""" | |
"""Test models.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After careful review, I agree with these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve.
Description
chore: update ci
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!
make format
. (required)make lint
. (required)make test
pass. (required)