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

Fix: accept both task ID and task name in command line --task argument #1728

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ddebenedittis
Copy link

Description

When running tasks from the command line, e.g.

python source/standalone/workflows/rl_games/train.py --task=Isaac-Cartpole-Direct-v0 --headless

the --task argument should be the task ID (which includes the version number).

However, if an invalid task ID is provided, the error message from Gymnasium suggests using a similar task name, not a task ID, which can be confusing.

This pull request introduces the ability to use either a task ID or a task name in the --task argument. If a task name is provided, the script will default to using the latest version of the environment and print a warning to notify the user:

/workspace/isaaclab/source/Gymnasium/gymnasium/envs/registration.py:527: UserWarning: WARN: Using the latest versioned environment `Isaac-Cartpole-Direct-v0` instead of the unversioned environment `Isaac-Cartpole-Direct`.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant