updated code
Browse files- lunar_lander_v2.ipynb +124 -94
lunar_lander_v2.ipynb
CHANGED
@@ -635,12 +635,11 @@
|
|
635 |
"execution_count": null,
|
636 |
"metadata": {
|
637 |
"colab": {
|
638 |
-
"base_uri": "https://localhost:8080/"
|
639 |
-
"height": 0
|
640 |
},
|
641 |
"collapsed": true,
|
642 |
"id": "LDIiamp-xyyw",
|
643 |
-
"outputId": "
|
644 |
},
|
645 |
"outputs": [
|
646 |
{
|
@@ -663,7 +662,7 @@
|
|
663 |
"After this operation, 5,822 kB of additional disk space will be used.\n",
|
664 |
"Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 swig3.0 amd64 3.0.12-1 [1,094 kB]\n",
|
665 |
"Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 swig amd64 3.0.12-1 [6,460 B]\n",
|
666 |
-
"Fetched 1,100 kB in
|
667 |
"Selecting previously unselected package swig3.0.\n",
|
668 |
"(Reading database ... 124016 files and directories currently installed.)\n",
|
669 |
"Preparing to unpack .../swig3.0_3.0.12-1_amd64.deb ...\n",
|
@@ -677,104 +676,104 @@
|
|
677 |
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
|
678 |
"Collecting stable-baselines3[extra]\n",
|
679 |
" Downloading stable_baselines3-1.6.2-py3-none-any.whl (170 kB)\n",
|
680 |
-
"\u001b[2K \u001b[90m
|
681 |
"\u001b[?25hCollecting box2d\n",
|
682 |
" Downloading Box2D-2.3.10-cp38-cp38-manylinux1_x86_64.whl (1.3 MB)\n",
|
683 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[
|
684 |
"\u001b[?25hCollecting box2d-kengz\n",
|
685 |
" Downloading Box2D-kengz-2.3.3.tar.gz (425 kB)\n",
|
686 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m425.4/425.4 KB\u001b[0m \u001b[
|
687 |
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
688 |
"Collecting huggingface_sb3\n",
|
689 |
" Downloading huggingface_sb3-2.2.4-py3-none-any.whl (9.4 kB)\n",
|
690 |
"Collecting pyglet==1.5.1\n",
|
691 |
" Downloading pyglet-1.5.1-py2.py3-none-any.whl (1.0 MB)\n",
|
692 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[
|
693 |
-
"\u001b[?
|
|
|
|
|
|
|
|
|
694 |
" Downloading importlib_metadata-4.13.0-py3-none-any.whl (23 kB)\n",
|
695 |
-
"Requirement already satisfied: torch>=1.11 in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.13.0+cu116)\n",
|
696 |
"Collecting gym==0.21\n",
|
697 |
" Downloading gym-0.21.0.tar.gz (1.5 MB)\n",
|
698 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[
|
699 |
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
700 |
-
"Requirement already satisfied:
|
701 |
-
"
|
702 |
-
"Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.21.6)\n",
|
703 |
-
"Requirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.3.5)\n",
|
704 |
-
"Requirement already satisfied: tensorboard>=2.9.1 in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.9.1)\n",
|
705 |
-
"Requirement already satisfied: opencv-python in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.6.0.66)\n",
|
706 |
-
"Requirement already satisfied: pillow in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (7.1.2)\n",
|
707 |
-
"Collecting ale-py==0.7.4\n",
|
708 |
-
" Downloading ale_py-0.7.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)\n",
|
709 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m77.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
710 |
-
"\u001b[?25hCollecting rich\n",
|
711 |
" Downloading rich-13.0.0-py3-none-any.whl (238 kB)\n",
|
712 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m238.1/238.1 KB\u001b[0m \u001b[31m27.
|
713 |
"\u001b[?25hCollecting autorom[accept-rom-license]~=0.4.2\n",
|
714 |
" Downloading AutoROM-0.4.2-py3-none-any.whl (16 kB)\n",
|
715 |
-
"Requirement already satisfied: psutil in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (5.4.8)\n",
|
716 |
"Requirement already satisfied: tqdm in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.64.1)\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
"Requirement already satisfied: importlib-resources in /usr/local/lib/python3.8/dist-packages (from ale-py==0.7.4->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (5.10.1)\n",
|
718 |
"Requirement already satisfied: pyyaml~=6.0 in /usr/local/lib/python3.8/dist-packages (from huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (6.0)\n",
|
719 |
-
"Collecting cloudpickle\n",
|
720 |
-
" Downloading cloudpickle-2.2.0-py3-none-any.whl (25 kB)\n",
|
721 |
"Collecting huggingface-hub~=0.8\n",
|
722 |
" Downloading huggingface_hub-0.11.1-py3-none-any.whl (182 kB)\n",
|
723 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m182.4/182.4 KB\u001b[0m \u001b[
|
724 |
-
"\u001b[?
|
725 |
-
"
|
|
|
726 |
"Requirement already satisfied: click in /usr/local/lib/python3.8/dist-packages (from autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (7.1.2)\n",
|
|
|
727 |
"Collecting AutoROM.accept-rom-license\n",
|
728 |
" Downloading AutoROM.accept-rom-license-0.5.0.tar.gz (10 kB)\n",
|
729 |
" Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
|
730 |
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
|
731 |
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
|
732 |
-
"Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.8/dist-packages (from huggingface-hub~=0.8->huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (21.3)\n",
|
733 |
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.8/dist-packages (from huggingface-hub~=0.8->huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (4.4.0)\n",
|
|
|
734 |
"Requirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from huggingface-hub~=0.8->huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (3.8.2)\n",
|
735 |
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.8/dist-packages (from importlib-metadata~=4.13->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.11.0)\n",
|
|
|
|
|
|
|
736 |
"Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.4.6)\n",
|
737 |
-
"Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.4.1)\n",
|
738 |
"Requirement already satisfied: protobuf<3.20,>=3.9.2 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.19.6)\n",
|
739 |
-
"Requirement already satisfied:
|
740 |
-
"Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.0.1)\n",
|
741 |
-
"Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.38.4)\n",
|
742 |
"Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.15.0)\n",
|
743 |
-
"Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (57.4.0)\n",
|
744 |
-
"Requirement already satisfied: grpcio>=1.24.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.51.1)\n",
|
745 |
"Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.3.0)\n",
|
746 |
-
"Requirement already satisfied:
|
747 |
-
"Requirement already satisfied:
|
|
|
748 |
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.4.4)\n",
|
749 |
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.0.9)\n",
|
750 |
"Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.8.2)\n",
|
|
|
751 |
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2022.7)\n",
|
752 |
"Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /usr/local/lib/python3.8/dist-packages (from rich->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.6.1)\n",
|
753 |
"Collecting commonmark<0.10.0,>=0.9.0\n",
|
754 |
" Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)\n",
|
755 |
-
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m51.1/51.1 KB\u001b[0m \u001b[
|
756 |
"\u001b[?25hRequirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.9)\n",
|
757 |
-
"Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.2.8)\n",
|
758 |
-
"Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.15.0)\n",
|
759 |
"Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (5.2.0)\n",
|
|
|
|
|
760 |
"Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.8/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.3.1)\n",
|
761 |
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.24.3)\n",
|
762 |
-
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2022.12.7)\n",
|
763 |
-
"Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.0.0)\n",
|
764 |
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.10)\n",
|
|
|
|
|
765 |
"Collecting libtorrent\n",
|
766 |
" Using cached libtorrent-2.0.7-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (8.6 MB)\n",
|
767 |
"Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.8/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.4.8)\n",
|
768 |
"Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.8/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.2.2)\n",
|
769 |
"Building wheels for collected packages: gym, box2d-kengz, AutoROM.accept-rom-license\n",
|
770 |
" Building wheel for gym (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
771 |
-
" Created wheel for gym: filename=gym-0.21.0-py3-none-any.whl size=
|
772 |
" Stored in directory: /root/.cache/pip/wheels/27/6d/b3/a3a6e10704795c9b9000f1ab2dc480dfe7bed42f5972806e73\n",
|
773 |
" Building wheel for box2d-kengz (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
774 |
-
" Created wheel for box2d-kengz: filename=Box2D_kengz-2.3.3-cp38-cp38-linux_x86_64.whl size=
|
775 |
" Stored in directory: /root/.cache/pip/wheels/87/3a/ed/260cc09ed176c5b06aed67364b2387a3a62e7351396a979555\n",
|
776 |
" Building wheel for AutoROM.accept-rom-license (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
|
777 |
-
" Created wheel for AutoROM.accept-rom-license: filename=AutoROM.accept_rom_license-0.5.0-py3-none-any.whl size=440868 sha256=
|
778 |
" Stored in directory: /root/.cache/pip/wheels/bf/c9/25/578470ae932b494c313dc22e6c57afff192140fb3cd5acf185\n",
|
779 |
"Successfully built gym box2d-kengz AutoROM.accept-rom-license\n",
|
780 |
"Installing collected packages: pyglet, libtorrent, commonmark, box2d-kengz, box2d, rich, importlib-metadata, cloudpickle, huggingface-hub, gym, AutoROM.accept-rom-license, autorom, ale-py, stable-baselines3, huggingface_sb3\n",
|
@@ -790,49 +789,29 @@
|
|
790 |
" Found existing installation: gym 0.25.2\n",
|
791 |
" Uninstalling gym-0.25.2:\n",
|
792 |
" Successfully uninstalled gym-0.25.2\n",
|
793 |
-
"Successfully installed AutoROM.accept-rom-license-0.5.0 ale-py-0.7.4 autorom-0.4.2 box2d-2.3.10 box2d-kengz-2.3.3 cloudpickle-2.2.0 commonmark-0.9.1 gym-0.21.0 huggingface-hub-0.11.1 huggingface_sb3-2.2.4 importlib-metadata-4.13.0 libtorrent-2.0.7 pyglet-1.5.1 rich-13.0.0 stable-baselines3-1.6.2\n"
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
"
|
800 |
-
|
801 |
-
"packages": [
|
802 |
-
"gym",
|
803 |
-
"importlib_metadata"
|
804 |
-
]
|
805 |
-
}
|
806 |
-
}
|
807 |
-
},
|
808 |
-
"metadata": {}
|
809 |
-
},
|
810 |
-
{
|
811 |
-
"output_type": "stream",
|
812 |
-
"name": "stdout",
|
813 |
-
"text": [
|
814 |
-
"\r0% [Working]\r \rGet:1 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ InRelease [3,626 B]\n",
|
815 |
-
"Get:2 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ Packages [102 kB]\n",
|
816 |
-
"Ign:3 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease\n",
|
817 |
-
"Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease\n",
|
818 |
-
"Hit:5 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release\n",
|
819 |
-
"Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]\n",
|
820 |
-
"Hit:8 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu bionic InRelease\n",
|
821 |
"Hit:9 http://archive.ubuntu.com/ubuntu bionic InRelease\n",
|
822 |
-
"
|
823 |
-
"
|
824 |
"Hit:12 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease\n",
|
825 |
-
"Get:13 http://
|
826 |
-
"Get:14 http://
|
827 |
-
"Get:15 http://
|
828 |
-
"Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/
|
829 |
-
"Get:17 http://
|
830 |
-
"Get:18 http://
|
831 |
-
"Get:19 http://
|
832 |
-
"Get:20 http://
|
833 |
-
"Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/
|
834 |
-
"Get:22 http://
|
835 |
-
"Fetched 13.7 MB in
|
836 |
"Reading package lists... Done\n",
|
837 |
"Reading package lists... Done\n",
|
838 |
"Building dependency tree \n",
|
@@ -851,7 +830,7 @@
|
|
851 |
"After this operation, 5,733 kB of additional disk space will be used.\n",
|
852 |
"Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 freeglut3 amd64 2.8.1-3 [73.6 kB]\n",
|
853 |
"Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python-opengl all 3.1.0+dfsg-1 [496 kB]\n",
|
854 |
-
"Fetched 570 kB in
|
855 |
"Selecting previously unselected package freeglut3:amd64.\n",
|
856 |
"(Reading database ... 124807 files and directories currently installed.)\n",
|
857 |
"Preparing to unpack .../freeglut3_2.8.1-3_amd64.deb ...\n",
|
@@ -882,7 +861,7 @@
|
|
882 |
"Need to get 785 kB of archives.\n",
|
883 |
"After this operation, 2,271 kB of additional disk space will be used.\n",
|
884 |
"Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 xvfb amd64 2:1.19.6-1ubuntu4.13 [785 kB]\n",
|
885 |
-
"Fetched 785 kB in 1s (
|
886 |
"Selecting previously unselected package xvfb.\n",
|
887 |
"(Reading database ... 127167 files and directories currently installed.)\n",
|
888 |
"Preparing to unpack .../xvfb_2%3a1.19.6-1ubuntu4.13_amd64.deb ...\n",
|
@@ -3279,12 +3258,31 @@
|
|
3279 |
}
|
3280 |
]
|
3281 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3282 |
{
|
3283 |
"cell_type": "code",
|
3284 |
"source": [
|
3285 |
-
"
|
|
|
|
|
3286 |
"from huggingface_sb3 import load_from_hub\n",
|
3287 |
"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3288 |
"repo_id = f'asuzuki/{model_architecture}-{env_id}'\n",
|
3289 |
"model_name = \"ppo-LunarLander-v2\"\n",
|
3290 |
"filename = f'{model_name}.zip'\n",
|
@@ -3305,13 +3303,45 @@
|
|
3305 |
"\n",
|
3306 |
"eval_env = gym.make(\"LunarLander-v2\")\n",
|
3307 |
"mean_reward, std_reward = evaluate_policy(model, eval_env, n_eval_episodes=10, deterministic=True)\n",
|
3308 |
-
"print(f\"
|
3309 |
],
|
3310 |
"metadata": {
|
3311 |
-
"id": "I--dK8P0UTGa"
|
|
|
|
|
|
|
|
|
3312 |
},
|
3313 |
-
"execution_count":
|
3314 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3315 |
},
|
3316 |
{
|
3317 |
"cell_type": "code",
|
|
|
635 |
"execution_count": null,
|
636 |
"metadata": {
|
637 |
"colab": {
|
638 |
+
"base_uri": "https://localhost:8080/"
|
|
|
639 |
},
|
640 |
"collapsed": true,
|
641 |
"id": "LDIiamp-xyyw",
|
642 |
+
"outputId": "a4107dcd-ef6a-4a37-b150-3285488d7720"
|
643 |
},
|
644 |
"outputs": [
|
645 |
{
|
|
|
662 |
"After this operation, 5,822 kB of additional disk space will be used.\n",
|
663 |
"Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 swig3.0 amd64 3.0.12-1 [1,094 kB]\n",
|
664 |
"Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 swig amd64 3.0.12-1 [6,460 B]\n",
|
665 |
+
"Fetched 1,100 kB in 1s (844 kB/s)\n",
|
666 |
"Selecting previously unselected package swig3.0.\n",
|
667 |
"(Reading database ... 124016 files and directories currently installed.)\n",
|
668 |
"Preparing to unpack .../swig3.0_3.0.12-1_amd64.deb ...\n",
|
|
|
676 |
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
|
677 |
"Collecting stable-baselines3[extra]\n",
|
678 |
" Downloading stable_baselines3-1.6.2-py3-none-any.whl (170 kB)\n",
|
679 |
+
"\u001b[2K \u001b[90mβββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m170.0/170.0 KB\u001b[0m \u001b[31m8.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
680 |
"\u001b[?25hCollecting box2d\n",
|
681 |
" Downloading Box2D-2.3.10-cp38-cp38-manylinux1_x86_64.whl (1.3 MB)\n",
|
682 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m48.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
683 |
"\u001b[?25hCollecting box2d-kengz\n",
|
684 |
" Downloading Box2D-kengz-2.3.3.tar.gz (425 kB)\n",
|
685 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m425.4/425.4 KB\u001b[0m \u001b[31m41.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
686 |
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
687 |
"Collecting huggingface_sb3\n",
|
688 |
" Downloading huggingface_sb3-2.2.4-py3-none-any.whl (9.4 kB)\n",
|
689 |
"Collecting pyglet==1.5.1\n",
|
690 |
" Downloading pyglet-1.5.1-py2.py3-none-any.whl (1.0 MB)\n",
|
691 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m53.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
692 |
+
"\u001b[?25hRequirement already satisfied: matplotlib in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.2.2)\n",
|
693 |
+
"Requirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.3.5)\n",
|
694 |
+
"Requirement already satisfied: cloudpickle in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.5.0)\n",
|
695 |
+
"Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.21.6)\n",
|
696 |
+
"Collecting importlib-metadata~=4.13\n",
|
697 |
" Downloading importlib_metadata-4.13.0-py3-none-any.whl (23 kB)\n",
|
|
|
698 |
"Collecting gym==0.21\n",
|
699 |
" Downloading gym-0.21.0.tar.gz (1.5 MB)\n",
|
700 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m69.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
701 |
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
702 |
+
"Requirement already satisfied: torch>=1.11 in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.13.0+cu116)\n",
|
703 |
+
"Collecting rich\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
704 |
" Downloading rich-13.0.0-py3-none-any.whl (238 kB)\n",
|
705 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m238.1/238.1 KB\u001b[0m \u001b[31m27.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
706 |
"\u001b[?25hCollecting autorom[accept-rom-license]~=0.4.2\n",
|
707 |
" Downloading AutoROM-0.4.2-py3-none-any.whl (16 kB)\n",
|
|
|
708 |
"Requirement already satisfied: tqdm in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.64.1)\n",
|
709 |
+
"Collecting ale-py==0.7.4\n",
|
710 |
+
" Downloading ale_py-0.7.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)\n",
|
711 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m75.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
712 |
+
"\u001b[?25hRequirement already satisfied: pillow in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (7.1.2)\n",
|
713 |
+
"Requirement already satisfied: tensorboard>=2.9.1 in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.9.1)\n",
|
714 |
+
"Requirement already satisfied: opencv-python in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.6.0.66)\n",
|
715 |
+
"Requirement already satisfied: psutil in /usr/local/lib/python3.8/dist-packages (from stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (5.4.8)\n",
|
716 |
"Requirement already satisfied: importlib-resources in /usr/local/lib/python3.8/dist-packages (from ale-py==0.7.4->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (5.10.1)\n",
|
717 |
"Requirement already satisfied: pyyaml~=6.0 in /usr/local/lib/python3.8/dist-packages (from huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (6.0)\n",
|
|
|
|
|
718 |
"Collecting huggingface-hub~=0.8\n",
|
719 |
" Downloading huggingface_hub-0.11.1-py3-none-any.whl (182 kB)\n",
|
720 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m182.4/182.4 KB\u001b[0m \u001b[31m22.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
721 |
+
"\u001b[?25hCollecting cloudpickle\n",
|
722 |
+
" Downloading cloudpickle-2.2.0-py3-none-any.whl (25 kB)\n",
|
723 |
+
"Requirement already satisfied: wasabi in /usr/local/lib/python3.8/dist-packages (from huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (0.10.1)\n",
|
724 |
"Requirement already satisfied: click in /usr/local/lib/python3.8/dist-packages (from autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (7.1.2)\n",
|
725 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (from autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.25.1)\n",
|
726 |
"Collecting AutoROM.accept-rom-license\n",
|
727 |
" Downloading AutoROM.accept-rom-license-0.5.0.tar.gz (10 kB)\n",
|
728 |
" Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
|
729 |
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
|
730 |
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
|
|
|
731 |
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.8/dist-packages (from huggingface-hub~=0.8->huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (4.4.0)\n",
|
732 |
+
"Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.8/dist-packages (from huggingface-hub~=0.8->huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (21.3)\n",
|
733 |
"Requirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from huggingface-hub~=0.8->huggingface_sb3->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 4)) (3.8.2)\n",
|
734 |
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.8/dist-packages (from importlib-metadata~=4.13->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.11.0)\n",
|
735 |
+
"Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (57.4.0)\n",
|
736 |
+
"Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.0.1)\n",
|
737 |
+
"Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.8.1)\n",
|
738 |
"Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.4.6)\n",
|
|
|
739 |
"Requirement already satisfied: protobuf<3.20,>=3.9.2 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.19.6)\n",
|
740 |
+
"Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.4.1)\n",
|
|
|
|
|
741 |
"Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.15.0)\n",
|
|
|
|
|
742 |
"Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.3.0)\n",
|
743 |
+
"Requirement already satisfied: grpcio>=1.24.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.51.1)\n",
|
744 |
+
"Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.6.1)\n",
|
745 |
+
"Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.38.4)\n",
|
746 |
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.4.4)\n",
|
747 |
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.0.9)\n",
|
748 |
"Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.8.2)\n",
|
749 |
+
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.8/dist-packages (from matplotlib->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.11.0)\n",
|
750 |
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2022.7)\n",
|
751 |
"Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /usr/local/lib/python3.8/dist-packages (from rich->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.6.1)\n",
|
752 |
"Collecting commonmark<0.10.0,>=0.9.0\n",
|
753 |
" Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)\n",
|
754 |
+
"\u001b[2K \u001b[90mββββββββββββββββββββββββββββββββββββββββ\u001b[0m \u001b[32m51.1/51.1 KB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
755 |
"\u001b[?25hRequirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.9)\n",
|
|
|
|
|
756 |
"Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (5.2.0)\n",
|
757 |
+
"Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.15.0)\n",
|
758 |
+
"Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.2.8)\n",
|
759 |
"Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.8/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.3.1)\n",
|
760 |
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (1.24.3)\n",
|
|
|
|
|
761 |
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2.10)\n",
|
762 |
+
"Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (4.0.0)\n",
|
763 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests->autorom[accept-rom-license]~=0.4.2->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (2022.12.7)\n",
|
764 |
"Collecting libtorrent\n",
|
765 |
" Using cached libtorrent-2.0.7-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (8.6 MB)\n",
|
766 |
"Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.8/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (0.4.8)\n",
|
767 |
"Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.8/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.9.1->stable-baselines3[extra]->-r https://raw.githubusercontent.com/huggingface/deep-rl-class/main/notebooks/unit1/requirements-unit1.txt (line 1)) (3.2.2)\n",
|
768 |
"Building wheels for collected packages: gym, box2d-kengz, AutoROM.accept-rom-license\n",
|
769 |
" Building wheel for gym (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
770 |
+
" Created wheel for gym: filename=gym-0.21.0-py3-none-any.whl size=1616823 sha256=778c35c52b1d64ae226db61a0d518e1c3ef6a26a960639903fcbe2e0c73e71a9\n",
|
771 |
" Stored in directory: /root/.cache/pip/wheels/27/6d/b3/a3a6e10704795c9b9000f1ab2dc480dfe7bed42f5972806e73\n",
|
772 |
" Building wheel for box2d-kengz (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
|
773 |
+
" Created wheel for box2d-kengz: filename=Box2D_kengz-2.3.3-cp38-cp38-linux_x86_64.whl size=2054123 sha256=a4094d8c43749b14b68aeff2eb2eef90383d1f2f197c08fab47128d6b9e07380\n",
|
774 |
" Stored in directory: /root/.cache/pip/wheels/87/3a/ed/260cc09ed176c5b06aed67364b2387a3a62e7351396a979555\n",
|
775 |
" Building wheel for AutoROM.accept-rom-license (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
|
776 |
+
" Created wheel for AutoROM.accept-rom-license: filename=AutoROM.accept_rom_license-0.5.0-py3-none-any.whl size=440868 sha256=cb6113ecf8f9713f6331e1a2757df1b219447ebcfd6b36f184b047ab79f47ac4\n",
|
777 |
" Stored in directory: /root/.cache/pip/wheels/bf/c9/25/578470ae932b494c313dc22e6c57afff192140fb3cd5acf185\n",
|
778 |
"Successfully built gym box2d-kengz AutoROM.accept-rom-license\n",
|
779 |
"Installing collected packages: pyglet, libtorrent, commonmark, box2d-kengz, box2d, rich, importlib-metadata, cloudpickle, huggingface-hub, gym, AutoROM.accept-rom-license, autorom, ale-py, stable-baselines3, huggingface_sb3\n",
|
|
|
789 |
" Found existing installation: gym 0.25.2\n",
|
790 |
" Uninstalling gym-0.25.2:\n",
|
791 |
" Successfully uninstalled gym-0.25.2\n",
|
792 |
+
"Successfully installed AutoROM.accept-rom-license-0.5.0 ale-py-0.7.4 autorom-0.4.2 box2d-2.3.10 box2d-kengz-2.3.3 cloudpickle-2.2.0 commonmark-0.9.1 gym-0.21.0 huggingface-hub-0.11.1 huggingface_sb3-2.2.4 importlib-metadata-4.13.0 libtorrent-2.0.7 pyglet-1.5.1 rich-13.0.0 stable-baselines3-1.6.2\n",
|
793 |
+
"Get:1 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ InRelease [3,626 B]\n",
|
794 |
+
"Ign:2 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease\n",
|
795 |
+
"Hit:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease\n",
|
796 |
+
"Hit:4 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release\n",
|
797 |
+
"Get:5 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ Packages [102 kB]\n",
|
798 |
+
"Hit:6 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu bionic InRelease\n",
|
799 |
+
"Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
800 |
"Hit:9 http://archive.ubuntu.com/ubuntu bionic InRelease\n",
|
801 |
+
"Hit:10 http://ppa.launchpad.net/cran/libgit2/ubuntu bionic InRelease\n",
|
802 |
+
"Get:11 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]\n",
|
803 |
"Hit:12 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease\n",
|
804 |
+
"Get:13 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease [21.3 kB]\n",
|
805 |
+
"Get:14 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,568 kB]\n",
|
806 |
+
"Get:15 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]\n",
|
807 |
+
"Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [30.9 kB]\n",
|
808 |
+
"Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3,549 kB]\n",
|
809 |
+
"Get:18 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 Packages [43.2 kB]\n",
|
810 |
+
"Get:19 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [3,102 kB]\n",
|
811 |
+
"Get:20 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [1,315 kB]\n",
|
812 |
+
"Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [1,389 kB]\n",
|
813 |
+
"Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,348 kB]\n",
|
814 |
+
"Fetched 13.7 MB in 3s (4,566 kB/s)\n",
|
815 |
"Reading package lists... Done\n",
|
816 |
"Reading package lists... Done\n",
|
817 |
"Building dependency tree \n",
|
|
|
830 |
"After this operation, 5,733 kB of additional disk space will be used.\n",
|
831 |
"Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 freeglut3 amd64 2.8.1-3 [73.6 kB]\n",
|
832 |
"Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python-opengl all 3.1.0+dfsg-1 [496 kB]\n",
|
833 |
+
"Fetched 570 kB in 1s (993 kB/s)\n",
|
834 |
"Selecting previously unselected package freeglut3:amd64.\n",
|
835 |
"(Reading database ... 124807 files and directories currently installed.)\n",
|
836 |
"Preparing to unpack .../freeglut3_2.8.1-3_amd64.deb ...\n",
|
|
|
861 |
"Need to get 785 kB of archives.\n",
|
862 |
"After this operation, 2,271 kB of additional disk space will be used.\n",
|
863 |
"Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 xvfb amd64 2:1.19.6-1ubuntu4.13 [785 kB]\n",
|
864 |
+
"Fetched 785 kB in 1s (1,446 kB/s)\n",
|
865 |
"Selecting previously unselected package xvfb.\n",
|
866 |
"(Reading database ... 127167 files and directories currently installed.)\n",
|
867 |
"Preparing to unpack .../xvfb_2%3a1.19.6-1ubuntu4.13_amd64.deb ...\n",
|
|
|
3258 |
}
|
3259 |
]
|
3260 |
},
|
3261 |
+
{
|
3262 |
+
"cell_type": "markdown",
|
3263 |
+
"source": [
|
3264 |
+
"#LOAD MODEL"
|
3265 |
+
],
|
3266 |
+
"metadata": {
|
3267 |
+
"id": "PF4eGTuzcETq"
|
3268 |
+
}
|
3269 |
+
},
|
3270 |
{
|
3271 |
"cell_type": "code",
|
3272 |
"source": [
|
3273 |
+
"import gym\n",
|
3274 |
+
"from stable_baselines3 import PPO\n",
|
3275 |
+
"from stable_baselines3.common.evaluation import evaluate_policy\n",
|
3276 |
"from huggingface_sb3 import load_from_hub\n",
|
3277 |
"\n",
|
3278 |
+
"# TODO: Define the name of the environment\n",
|
3279 |
+
"env_id = 'LunarLander-v2'\n",
|
3280 |
+
"\n",
|
3281 |
+
"# Define the model architecture we used\n",
|
3282 |
+
"model_architecture = \"PPO\"\n",
|
3283 |
+
"\n",
|
3284 |
+
"model_name = \"ppo-LunarLander-v2\"\n",
|
3285 |
+
"\n",
|
3286 |
"repo_id = f'asuzuki/{model_architecture}-{env_id}'\n",
|
3287 |
"model_name = \"ppo-LunarLander-v2\"\n",
|
3288 |
"filename = f'{model_name}.zip'\n",
|
|
|
3303 |
"\n",
|
3304 |
"eval_env = gym.make(\"LunarLander-v2\")\n",
|
3305 |
"mean_reward, std_reward = evaluate_policy(model, eval_env, n_eval_episodes=10, deterministic=True)\n",
|
3306 |
+
"print(f\"\\n\\nmean_reward={mean_reward:.2f} +/- {std_reward}\")"
|
3307 |
],
|
3308 |
"metadata": {
|
3309 |
+
"id": "I--dK8P0UTGa",
|
3310 |
+
"colab": {
|
3311 |
+
"base_uri": "https://localhost:8080/"
|
3312 |
+
},
|
3313 |
+
"outputId": "860d703d-5cae-462d-a378-fb65517602b9"
|
3314 |
},
|
3315 |
+
"execution_count": 7,
|
3316 |
+
"outputs": [
|
3317 |
+
{
|
3318 |
+
"output_type": "stream",
|
3319 |
+
"name": "stdout",
|
3320 |
+
"text": [
|
3321 |
+
"== CURRENT SYSTEM INFO ==\n",
|
3322 |
+
"OS: Linux-5.10.147+-x86_64-with-glibc2.27 #1 SMP Sat Dec 10 16:00:40 UTC 2022\n",
|
3323 |
+
"Python: 3.8.16\n",
|
3324 |
+
"Stable-Baselines3: 1.6.2\n",
|
3325 |
+
"PyTorch: 1.13.0+cu116\n",
|
3326 |
+
"GPU Enabled: True\n",
|
3327 |
+
"Numpy: 1.21.6\n",
|
3328 |
+
"Gym: 0.21.0\n",
|
3329 |
+
"\n",
|
3330 |
+
"== SAVED MODEL SYSTEM INFO ==\n",
|
3331 |
+
"OS: Linux-5.10.147+-x86_64-with-glibc2.27 #1 SMP Sat Dec 10 16:00:40 UTC 2022\n",
|
3332 |
+
"Python: 3.8.16\n",
|
3333 |
+
"Stable-Baselines3: 1.6.2\n",
|
3334 |
+
"PyTorch: 1.13.0+cu116\n",
|
3335 |
+
"GPU Enabled: True\n",
|
3336 |
+
"Numpy: 1.21.6\n",
|
3337 |
+
"Gym: 0.21.0\n",
|
3338 |
+
"\n",
|
3339 |
+
"\n",
|
3340 |
+
"\n",
|
3341 |
+
"mean_reward=251.52 +/- 26.518009760699584\n"
|
3342 |
+
]
|
3343 |
+
}
|
3344 |
+
]
|
3345 |
},
|
3346 |
{
|
3347 |
"cell_type": "code",
|