Skip to content

Commit

Permalink
Update wget with GitHub link instead
Browse files Browse the repository at this point in the history
  • Loading branch information
simoninithomas committed Jan 24, 2024
1 parent 605ce60 commit 07ff43d
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions notebooks/unit5/unit5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
{
"cell_type": "markdown",
"source": [
"### 🎮 Environments: \n",
"### 🎮 Environments:\n",
"\n",
"- [Pyramids](https://github.com/Unity-Technologies/ml-agents/blob/main/docs/Learning-Environment-Examples.md#pyramids)\n",
"- SnowballTarget\n",
"\n",
"### 📚 RL-Library: \n",
"### 📚 RL-Library:\n",
"\n",
"- [ML-Agents](https://github.com/Unity-Technologies/ml-agents)\n"
],
Expand Down Expand Up @@ -117,7 +117,7 @@
"\n",
"- 📖 Study Deep Reinforcement Learning in **theory and practice**.\n",
"- 🧑‍💻 Learn to **use famous Deep RL libraries** such as Stable Baselines3, RL Baselines3 Zoo, CleanRL and Sample Factory 2.0.\n",
"- 🤖 Train **agents in unique environments** \n",
"- 🤖 Train **agents in unique environments**\n",
"\n",
"And more check 📚 the syllabus 👉 https://huggingface.co/deep-rl-course/communication/publishing-schedule\n",
"\n",
Expand Down Expand Up @@ -252,25 +252,23 @@
},
{
"cell_type": "markdown",
"metadata": {
"id": "jsoZGxr1MIXY"
},
"source": [
"Download the file SnowballTarget.zip from https://drive.google.com/file/d/1YHHLjyj6gaZ3Gemx1hQgqrPgSS2ZhmB5 using `wget`. \n",
"\n",
"Check out the full solution to download large files from GDrive [here](https://bcrf.biochem.wisc.edu/2021/02/05/download-google-drive-files-using-wget/)"
]
"We downloaded the file SnowballTarget.zip from https://github.com/huggingface/Snowball-Target using `wget`"
],
"metadata": {
"id": "ekSh8LWawkB5"
}
},
{
"cell_type": "code",
"execution_count": null,
"source": [
"!wget \"https://github.com/huggingface/Snowball-Target/raw/main/SnowballTarget.zip\" -O ./training-envs-executables/linux/SnowballTarget.zip"
],
"metadata": {
"id": "QU6gi8CmWhnA"
"id": "6LosWO50wa77"
},
"outputs": [],
"source": [
"!wget --load-cookies /tmp/cookies.txt \"https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1YHHLjyj6gaZ3Gemx1hQgqrPgSS2ZhmB5' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p')&id=1YHHLjyj6gaZ3Gemx1hQgqrPgSS2ZhmB5\" -O ./training-envs-executables/linux/SnowballTarget.zip && rm -rf /tmp/cookies.txt"
]
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -299,7 +297,7 @@
"id": "nyumV5XfPKzu"
},
"source": [
"Make sure your file is accessible "
"Make sure your file is accessible"
]
},
{
Expand Down Expand Up @@ -400,9 +398,9 @@
"\n",
"<img src=\"https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit7/mlagentslearn.png\" alt=\"MlAgents learn\"/>\n",
"\n",
"Train the model and use the `--resume` flag to continue training in case of interruption. \n",
"Train the model and use the `--resume` flag to continue training in case of interruption.\n",
"\n",
"> It will fail first time if and when you use `--resume`, try running the block again to bypass the error. \n",
"> It will fail first time if and when you use `--resume`, try running the block again to bypass the error.\n",
"\n"
]
},
Expand Down Expand Up @@ -449,7 +447,7 @@
"\n",
"<img src=\"https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/notebooks/create-token.jpg\" alt=\"Create HF Token\">\n",
"\n",
"- Copy the token \n",
"- Copy the token\n",
"- Run the cell below and paste the token"
],
"metadata": {
Expand Down Expand Up @@ -573,7 +571,7 @@
"1. In step 1, choose your model repository which is the model id (in my case ThomasSimonini/ppo-SnowballTarget).\n",
"\n",
"2. In step 2, **choose what model you want to replay**:\n",
" - I have multiple one, since we saved a model every 500000 timesteps. \n",
" - I have multiple one, since we saved a model every 500000 timesteps.\n",
" - But if I want the more recent I choose `SnowballTarget.onnx`\n",
"\n",
"👉 What’s nice **is to try with different models step to see the improvement of the agent.**\n",
Expand Down Expand Up @@ -635,7 +633,7 @@
"id": "H7JmgOwcSSmF"
},
"source": [
"Wait for the upload to finish and then run the command below. \n",
"Wait for the upload to finish and then run the command below.\n",
"\n",
"![image.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASYAAAAfCAYAAABKxmALAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAmZSURBVHhe7d0NTNTnHQfwL+rxcigHFHUH9LCCVuaKCWgB4029Gq7NcBuLPdPKEhh6iRhEmauLY2V0ptEUSZGwTJTA5jSBOnGDmpyxEMUqxEH0rOIQfDmtt/oCnsof9BT2PPAcx8nbeTQi9vcxF56X+///h8n98vs9/xfcYmJiukEIIS+RCeInIYS8NChjIoS4LCwsDMHBwfDx8cEc76u4dNcT5y63orm5WbzDNRSYCCHPhQejuLg4xMbGwtvbW4wCymNLRAuQFAtwpW0Sio+34+uzN8So8ygwEUKc4uXlheTkZCxbtkyMOOofmGy63P1R37EAm4u+QUdHhxgdGa0xEUJGxLOknJycQYPSvXv3cPnyZTx0n4Fut4litNeEx61YMNGAQxun9uzDWZQxEUKGxQNKVlaWQ9nGg9Hhw4dx8uRJ3Lx5U4wCQYouvD3bB+qfTEWsT70Ytfv1l287tf5EgYkQMiRevvFMSalUihHAYDCgpKQEjx49EiODWzwL+MN73Zji1iZGgO/8l+ODbQ0jlnXjtJQLheZ9HTQzRXcAHbKK8pEeK7rfi5GOScirh68p9Q9K+/fvx65du0YMStyxS0DcTjecuh8lRoDprRXY8pvFoje0IQJTNNLzilBU5PjK35qO+Dly8Z6xFAF1nBZaTbjovwhjcUxCxg4v4fqvKfFM6cCBA6LnvIziK7jdFSh6wBKfE4iaGyJ6gxs2Y5LOFiIlJYW90pC5rQT1CEfCulRoxzw2lSN7TQo272kU/RdhLI5JyNjhlwTY8DUlXr65av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qampZ/Hb3d29Z8z21AGZTNaz9vTggf3s2mSPbqjn+kH/Xgg2xH4HRbf98oAnMn+sORiIW7duiZGhUcZECBkRD0YbN250yJxseHDiV4er7v8LP5K+hsxqL9tszK+twEd/Nzn911MoYyKEjIgHnurqaigUCsyc6fi0RE9PT/j5+UHx6L/wanW82bfL/TUcf/wzrN95yqlMyYYCEyHEKbysO336NOrr6+Hm5obp06f3lXech+UM3O+dwVOPqZB8ImFsfxMFx4A9/zb2bPs8qJQjhLiMl3i2P3ip9j2DpjZv1F7qxLmL9gVvV1BgIoS8dEZ9SwohhHzfKDARQl4ywP8B/eN9dc0U7ocAAAAASUVORK5CYII=)"
]
Expand Down Expand Up @@ -667,7 +665,7 @@
"id": "KmKYBgHTAVMP"
},
"source": [
"Make sure your file is accessible "
"Make sure your file is accessible"
]
},
{
Expand Down Expand Up @@ -769,7 +767,7 @@
"cell_type": "markdown",
"source": [
"### 🎁 Bonus: Why not train on another environment?\n",
"Now that you know how to train an agent using MLAgents, **why not try another environment?** \n",
"Now that you know how to train an agent using MLAgents, **why not try another environment?**\n",
"\n",
"MLAgents provides 17 different and we’re building some custom ones. The best way to learn is to try things of your own, have fun.\n",
"\n"
Expand All @@ -794,7 +792,7 @@
"\n",
"For the demos to visualize your agent 👉 https://huggingface.co/unity\n",
"\n",
"For now we have integrated: \n",
"For now we have integrated:\n",
"- [Worm](https://huggingface.co/spaces/unity/ML-Agents-Worm) demo where you teach a **worm to crawl**.\n",
"- [Walker](https://huggingface.co/spaces/unity/ML-Agents-Walker) demo where you teach an agent **to walk towards a goal**."
],
Expand Down

0 comments on commit 07ff43d

Please sign in to comment.