-
Couldn't load subscription status.
- Fork 4.4k
Update installation doc #6242
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
base: develop
Are you sure you want to change the base?
Update installation doc #6242
Conversation
* Update LICENSE Copyright date. * Updated changelog. * Updated package version in Academy.cs * Update package version. * Update release date
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.
I have added some initial suggestions. Please feel free to accept/reject as appropriate.
| @@ -1,23 +1,21 @@ | |||
| # Installation | |||
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.
| # Installation | |
| # Install the ML-Agents Toolkit |
| @@ -1,23 +1,21 @@ | |||
| # Installation | |||
| To install and use the ML-Agents Toolkit, follow the steps below. Detailed instructions for each step are provided later on this page. | |||
| To install and use the ML-Agents Toolkit, follow the steps below. Detailed instructions for each step are provided later on this page. For advanced installation and development setup, see the [Advanced Installation](#advanced-installation) section at the bottom of this page. | |||
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.
| To install and use the ML-Agents Toolkit, follow the steps below. Detailed instructions for each step are provided later on this page. For advanced installation and development setup, see the [Advanced Installation](#advanced-installation) section at the bottom of this page. | |
| Use this information to install and use the ML-Agents Toolkit. | |
| For advanced setup and development options, refer to [Advanced Installation](#advanced-installation). |
| 2. Install Python (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12 | ||
| 3. Install the `com.unity.ml-agents` Unity package; or clone this repository and install locally (recommended for the latest version and bug fixes) | ||
| 2. Install Python using conda (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12 | ||
| 3. Install the `com.unity.ml-agents` Unity package |
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.
| 3. Install the `com.unity.ml-agents` Unity package |
| 3. Install the `com.unity.ml-agents` Unity package; or clone this repository and install locally (recommended for the latest version and bug fixes) | ||
| 2. Install Python using conda (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12 | ||
| 3. Install the `com.unity.ml-agents` Unity package | ||
| 4. Install `mlagents-envs` |
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.
| 4. Install `mlagents-envs` |
| 2. Install Python using conda (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12 | ||
| 3. Install the `com.unity.ml-agents` Unity package | ||
| 4. Install `mlagents-envs` | ||
| 5. Install `mlagents` |
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.
| 5. Install `mlagents` |
| [Download](https://unity3d.com/get-unity/download) and install Unity. We strongly recommend that you install Unity through the Unity Hub as it will enable you to manage multiple Unity versions. | ||
|
|
||
| ### Install **Python 3.10.12** | ||
| ### Install **Python 3.10.12** using Conda |
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.
| ### Install **Python 3.10.12** using Conda | |
| ## Install Python 3.10.12 using Conda |
| #### Conda python setup | ||
|
|
||
| Once conda has been installed in your system, open a terminal and execute the following commands to setup a python 3.10.12 virtual environment and activate it. | ||
| Once conda has been installed on your system, open a terminal and execute the following commands to setup a Python 3.10.12 virtual environment and activate it: |
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.
Addressed above, so this can be removed.
| #### Conda python setup | ||
|
|
||
| Once conda has been installed in your system, open a terminal and execute the following commands to setup a python 3.10.12 virtual environment and activate it. | ||
| Once conda has been installed on your system, open a terminal and execute the following commands to setup a Python 3.10.12 virtual environment and activate it: |
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.
| Once conda has been installed on your system, open a terminal and execute the following commands to setup a Python 3.10.12 virtual environment and activate it: |
| The Unity ML-Agents C# SDK is a Unity Package. You can install the `com.unity.ml-agents` package [directly from the Package Manager registry](https://docs.unity3d.com/Manual/upm-ui-install.html). Please make sure you enable 'Preview Packages' in the 'Advanced' dropdown in order to find the latest Preview release of the package. | ||
|
|
||
| **NOTE:** If you do not see the ML-Agents package listed in the Package Manager please follow the advanced installation instructions below. | ||
| **NOTE:** If you do not see the ML-Agents package listed in the Package Manager please follow the [Advanced Installation](#advanced-installation) instructions at the bottom of this page. |
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.
| **NOTE:** If you do not see the ML-Agents package listed in the Package Manager please follow the [Advanced Installation](#advanced-installation) instructions at the bottom of this page. | |
| **NOTE:** If you don't see the ML-Agents package listed in the **Package Manager**, refer to [Advanced Installation](#advanced-installation). |
| ## Advanced Installation | ||
|
|
||
| #### Advanced: Local Installation for Development | ||
| ### Unity Package: Local Installation for Development |
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.
| ### Unity Package: Local Installation for Development | |
| ### Unity Package: Local installation for development |
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.
I have left some suggestions to reorganise the content of this page. Please accept/reject them as appropriate.
| 1. Navigating to the menu `Window` -> `Package Manager`. | ||
| 2. In the package manager window, click on the `+` button on the top left of the packages list. | ||
| 3. Select `Add package from disk...` | ||
| 4. Navigate into the `com.unity.ml-agents` folder. |
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.
| 4. Navigate into the `com.unity.ml-agents` folder. |
| 2. In the package manager window, click on the `+` button on the top left of the packages list. | ||
| 3. Select `Add package from disk...` | ||
| 4. Navigate into the `com.unity.ml-agents` folder. | ||
| 5. Select the `package.json` file. |
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.
| 5. Select the `package.json` file. |
|
|
||
| <p align="center"> <img src="images/unity_package_manager_window.png" alt="Unity Package Manager Window" height="150" border="10" /> <img src="images/unity_package_json.png" alt="package.json" height="150" border="10" /> </p> | ||
|
|
||
| If you are going to follow the examples from our documentation, you can open the `Project` folder in Unity and start tinkering immediately. |
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.
| If you are going to follow the examples from our documentation, you can open the `Project` folder in Unity and start tinkering immediately. |
| Note that on Windows, you may also need Microsoft's Visual C++ Redistributable if you don't have it already. See the [PyTorch installation guide](https://pytorch.org/get-started/locally/) for more installation options and versions. | ||
|
|
||
| #### All Platforms | ||
| ### 3.2.2 Install Python package |
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.
| ### 3.2.2 Install Python package | |
| #### Install the ML-Agents Python package | |
| Install the Python packages from the cloned repository to enable training and environment communication. | |
| 1. From the root of the cloned repository, activate your virtual environment and run: | |
cd /path/to/ml-agents
python -m pip install ./ml-agents-envs
python -m pip install ./ml-agents
This installs the ML-Agents packages directly from the cloned source, not from PyPI.
2. To confirm a successful installation, run:
mlagents-learn --help
If the command lists available parameters, your setup is complete.
3. If you plan to modify the ML-Agents source code or contribute changes, install the packages in editable mode.
Editable installs let you make live changes to the Python files and test them immediately.
From the repository’s root directory, run:
pip3 install torch -f https://download.pytorch.org/whl/torch_stable.html
pip3 install -e ./ml-agents-envs
pip3 install -e ./ml-agents
> [!NOTE]
> Install the packages in this order. The `mlagents` package depends on `mlagents_envs`. Installing them in the reverse order causes `mlagents_envs` to be downloaded from PyPI, which can cause version mismatches.
| #### All Platforms | ||
| ### 3.2.2 Install Python package | ||
|
|
||
| To install the `mlagents` Python package, activate your virtual environment and run from the command line: |
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.
You may please delete all the following information as it has been covered in the steps above.
Co-authored-by: manugaursharma <131156606+manugaursharma@users.noreply.github.com>
Proposed change(s)
Improve the installation documentation for better clarity and ease of use.
Types of change(s)
Checklist
Other comments