Skip to content

Commit

Permalink
Fix nb_python generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylion007 committed Aug 18, 2020
1 parent 59410f2 commit 2ff9416
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 105 deletions.
130 changes: 25 additions & 105 deletions examples/tutorials/colabs/habitat_challenge.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "_IITeNkkkqPW"
},
"metadata": {},
"source": [
"# Habitat Challenge Tutorial\n",
"\n",
Expand All @@ -16,10 +13,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "q_jhuelCX8CC"
},
"metadata": {},
"source": [
"# Install dependencies:\n",
"\n",
Expand All @@ -35,15 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 4318
},
"colab_type": "code",
"id": "VV-s1jvpstej",
"outputId": "affb4ce9-d73a-478a-bd8c-6b760658bb6f"
},
"metadata": {},
"outputs": [],
"source": [
"# Install dependencies\n",
Expand All @@ -68,17 +54,16 @@
"!nvidia-smi\n",
"\n",
"# Install conda and dependencies\n",
"!curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n",
"!chmod +x ~/miniconda.sh\n",
"!~/miniconda.sh -b -p $HOME/miniconda\n",
"!curl -o /content/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n",
"!bash $HOME/miniconda.sh -b -p $HOME/miniconda\n",
"!rm ~/miniconda.sh\n",
"!export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH\n",
"!conda create -y -n habitat python=3.6\n",
"!. activate habitat\n",
"!conda activate habitat\n",
"\n",
"# Install Docker\n",
"!export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH\n",
"!. activate habitat;\n",
"!conda activate habitat;\n",
"!curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n",
"!sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n",
"!sudo apt-get update\n",
Expand All @@ -103,10 +88,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "qsFJHfS0X500"
},
"metadata": {},
"source": [
"# Clone habitat-challenge repo and download required data:\n",
"\n",
Expand All @@ -121,13 +103,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 2227
},
"colab_type": "code",
"id": "5i4MQULFGOip",
"outputId": "71790946-c57d-4a0c-a121-e2fd7d79b548"
"lines_to_next_cell": 2
},
"outputs": [],
"source": [
Expand All @@ -140,36 +116,25 @@
"!mkdir -p habitat-challenge-data/data/scene_datasets\n",
"!cp -r $PATH_TO_SCENE_DATASETS habitat-challenge-data/data/\n",
"\n",
"#Task episodes dataset: PointNav v2 episodes for Gibson\n",
"# Task episodes dataset: PointNav v2 episodes for Gibson\n",
"!mkdir -p habitat-challenge-data/data/datasets/pointnav/gibson\n",
"!wget -c https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v2/pointnav_gibson_v2.zip && unzip -o pointnav_gibson_v2.zip -d habitat-challenge-data/data/datasets/pointnav/gibson\n",
"\n",
"# DDPPO baseline\n",
"!wget https://dl.fbaipublicfiles.com/habitat/data/baselines/v1/ddppo_pointnav_habitat2020_challenge_baseline_v1.pth\n"
"!wget https://dl.fbaipublicfiles.com/habitat/data/baselines/v1/ddppo_pointnav_habitat2020_challenge_baseline_v1.pth"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "Gzqn6wk_cSz_"
},
"metadata": {},
"source": [
"# Build Docker image Pointnav_DDPPO_baseline"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 989
},
"colab_type": "code",
"id": "m9q24eQRVaf0",
"outputId": "5ff512a4-a03a-432b-d75e-a5c49e31059a"
},
"metadata": {},
"outputs": [],
"source": [
"!cat Pointnav_DDPPO_baseline.Dockerfile\n",
Expand All @@ -178,37 +143,23 @@
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "b3KyhYAPcfZp"
},
"metadata": {},
"source": [
"# Run evaluation locally (takes 5 min)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 204
},
"colab_type": "code",
"id": "BxsNRqokUYuQ",
"outputId": "301a8d0d-879b-4cc6-b301-e59e35539b87"
},
"metadata": {},
"outputs": [],
"source": [
"!./test_locally_pointnav_rgbd.sh --docker-name ddppo_pointnav_submission"
"!bash /test_locally_pointnav_rgbd.sh --docker-name ddppo_pointnav_submission"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "Ru5Itf1wd0Vr"
},
"metadata": {},
"source": [
"# Push docker image to EvalAI Validation mini_val stage (50 episodes)\n",
"Check results on [the PointGoalNav v2 Minival stage leaderboard](https://evalai.cloudcv.org/web/challenges/challenge-page/580/leaderboard/1630).\n",
Expand All @@ -220,25 +171,16 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1686
},
"colab_type": "code",
"id": "RcE52oXnGY9e",
"outputId": "3cb8cda5-9343-4fb3-88a9-e1586fbee377"
"lines_to_next_cell": 2
},
"outputs": [],
"source": [
"!evalai push ddppo_pointnav_submission:latest --phase habitat20-pointnav-minival\n"
"!evalai push ddppo_pointnav_submission:latest --phase habitat20-pointnav-minival"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "CSC8uhwheY0P"
},
"metadata": {},
"source": [
"# Push docker image to EvalAI Test stage\n",
"*Can take up to 36 hours to get result.*"
Expand All @@ -247,15 +189,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1632
},
"colab_type": "code",
"id": "KX_jNLEJZis3",
"outputId": "29c7158c-70d4-44de-8952-282ff960f4dc"
},
"metadata": {},
"outputs": [],
"source": [
"# Push docker image to EvalAI docker registry\n",
Expand All @@ -265,36 +199,22 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 170
},
"colab_type": "code",
"id": "R1BEe2Mej_b9",
"outputId": "bcafddad-ebc8-4404-c555-eff52289c7da"
},
"metadata": {},
"outputs": [],
"source": [
"!evalai submission 94203"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "dpkAssTGkHdF"
},
"metadata": {},
"source": [
"# Happy hacking!"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "rnb8-GScZiuB"
},
"metadata": {},
"source": [
"\n",
"# Citing Habitat Challenge 2020\n",
Expand Down Expand Up @@ -349,5 +269,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 4
}
Loading

0 comments on commit 2ff9416

Please sign in to comment.