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: mlagents-learn: command not found #587

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nnilayy
Copy link

@nnilayy nnilayy commented Jan 18, 2025

Fixes #586

This PR fixes the Python version incompatibility between Colab and the ML-Agents library, which caused installation to silently fail and commands like mlagents-learn to not be recognized. It provides a fix by setting up a compatible Python version using a venv managed with Miniconda.

  • Added code to create, manage, and configure a venv using Miniconda in Colab for all related notebooks.
  • Updated documentation in the notebooks and the corresponding units\en .mdx files to align with the changes.

@simoninithomas Gentle ping for review.
Let me know if any other changes are needed. Thanks! 🤗

@nnilayy nnilayy changed the title Fix: mlagents-learn command not found issue Fix: mlagents-learn: command not found issue Jan 18, 2025
@nnilayy nnilayy changed the title Fix: mlagents-learn: command not found issue Fix: mlagents-learn: command not found Jan 18, 2025
@nnilayy
Copy link
Author

nnilayy commented Jan 29, 2025

@simoninithomas Gentle Bump For Review!!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


```bash
# Clone the repository (can take 3min)
git clone --depth 1 https://github.com/Unity-Technologies/ml-agents
```

## Setup the Virtual Environment 🔽

- In order for the **ML-Agents** to run successfully in Colab, Colab's Python version must meet the library's Python requirements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for writing this part, but I think we can also add it to the notebook since most of students will directly jump in the notebook 🤔

Copy link
Author

@nnilayy nnilayy Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @simoninithomas 🤗! The PR already includes the Setup the Virtual Environment section right after the Clone The Repository section in the notebooks as well, and the same section has been added in the corresponding .mdx files like linked above.

https://github.com/nnilayy/deep-rl-class/blob/3961024a68721a68eccd90f978c649ee42116d62/notebooks/bonus-unit1/bonus-unit1.ipynb?short_path=93db85a#L180-L250

This is done for both the Bonus-Unit-1 and Unit-5 notebooks and their corresponding .mdx files

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.

[HANDS-ON BUG] mlagents-learn: command not found
3 participants