Update bonus unit

This commit is contained in:
Thomas Simonini
2023-06-08 12:20:02 +02:00
parent 832c3e7360
commit ad9a56f678

View File

@@ -53,7 +53,7 @@
"\n",
"### The library used 📚\n",
"\n",
"- [MLAgents (Hugging Face version)](https://github.com/huggingface/ml-agents)"
"- [MLAgents](https://github.com/Unity-Technologies/ml-agents)"
],
"metadata": {
"id": "x7oR6R-ZIbeS"
@@ -161,7 +161,7 @@
"source": [
"## Clone the repository and install the dependencies 🔽\n",
"\n",
"- We need to clone the repository, that **contains the experimental version of the library that allows you to push your trained agent to the Hub.**"
"- We need to clone the repository, that contains **ML-Agents.**"
]
},
{
@@ -173,8 +173,8 @@
"outputs": [],
"source": [
"%%capture\n",
"# Clone this specific repository (can take 3min)\n",
"!git clone --depth 1 --branch hf-integration-save https://github.com/huggingface/ml-agents"
"# Clone the repository (can take 3min)\n",
"!git clone --depth 1 https://github.com/Unity-Technologies/ml-agents"
]
},
{
@@ -192,19 +192,6 @@
"!pip3 install -e ./ml-agents"
]
},
{
"cell_type": "code",
"source": [
"%%capture\n",
"# Due to some conflicts between mlagents and tensorflow we need to uninstall it\n",
"!pip3 uninstall tensorflow -y"
],
"metadata": {
"id": "yBRsYPvtTjrm"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
@@ -328,16 +315,69 @@
{
"cell_type": "markdown",
"source": [
"## Check the Huggy config file\n",
"## Create the Huggy config file\n",
"\n",
"- In ML-Agents, you define the **training hyperparameters into config.yaml files.**\n",
"\n",
"- For the scope of this notebook, we're not going to modify the hyperparameters, but if you want to try as an experiment, you should also try to modify some other hyperparameters, Unity provides very [good documentation explaining each of them here](https://github.com/Unity-Technologies/ml-agents/blob/main/docs/Training-Configuration-File.md)."
"- For the scope of this notebook, we're not going to modify the hyperparameters, but if you want to try as an experiment, you should also try to modify some other hyperparameters, Unity provides very [good documentation explaining each of them here](https://github.com/Unity-Technologies/ml-agents/blob/main/docs/Training-Configuration-File.md).\n",
"\n",
"- But we need to create a config file for Huggy. \n",
"\n",
"- Go to `/content/ml-agents/config/ppo`\n",
"\n",
"- Create a new file called `Huggy.yaml`\n",
"\n",
"- Copy and paste the content below 🔽"
],
"metadata": {
"id": "NAuEq32Mwvtz"
}
},
{
"cell_type": "code",
"source": [
"behaviors:\n",
" Huggy:\n",
" trainer_type: ppo\n",
" hyperparameters:\n",
" batch_size: 2048\n",
" buffer_size: 20480\n",
" learning_rate: 0.0003\n",
" beta: 0.005\n",
" epsilon: 0.2\n",
" lambd: 0.95\n",
" num_epoch: 3\n",
" learning_rate_schedule: linear\n",
" network_settings:\n",
" normalize: true\n",
" hidden_units: 512\n",
" num_layers: 3\n",
" vis_encode_type: simple\n",
" reward_signals:\n",
" extrinsic:\n",
" gamma: 0.995\n",
" strength: 1.0\n",
" checkpoint_interval: 200000\n",
" keep_checkpoints: 15\n",
" max_steps: 2e6\n",
" time_horizon: 1000\n",
" summary_freq: 50000"
],
"metadata": {
"id": "loQ0N5jhXW71"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"- Don't forget to save the file!"
],
"metadata": {
"id": "oakN7UHwXdCX"
}
},
{
"cell_type": "markdown",
"source": [
@@ -582,4 +622,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}