Skip to content

Commit

Permalink
Fixing GDrive download in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
phlippe committed Feb 14, 2024
1 parent d19546b commit 5439eb4
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions demo.ipynb
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Demo of BISCUIT-NF on the Embodied AI iTHOR dataset"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -19,7 +17,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -49,7 +46,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -77,7 +73,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -94,7 +89,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -115,20 +109,19 @@
"# Download the model\n",
"if not os.path.exists(CHECKPOINT_FILE):\n",
" print(\"Downloading the model...\")\n",
" !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=1GKFeEcoFFqLY3uMvrefS70THy6EcogqK' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p')&id=1GKFeEcoFFqLY3uMvrefS70THy6EcogqK\" -O pretrained_models.tar.gz && rm -rf /tmp/cookies.txt\n",
" !gdown 1GKFeEcoFFqLY3uMvrefS70THy6EcogqK\n",
" !tar -xzvf pretrained_models.tar.gz\n",
" !rm pretrained_models.tar.gz\n",
"\n",
"# Download the data\n",
"if not os.path.exists(DATA_FOLDER):\n",
" print(\"Downloading the data...\")\n",
" !wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1PEqpxrHdx8-RoApAPeeu8OQqK3qmqKqH' -O demo_data.tar.gz\n",
" !gdown 1PEqpxrHdx8-RoApAPeeu8OQqK3qmqKqH\n",
" !tar -xzvf demo_data.tar.gz\n",
" !rm demo_data.tar.gz"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -191,15 +184,13 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"You should see a sequence of three images, showing the kitchen environment of iTHOR. At the first time step, the agent is turning off the microwave, and at the second time step, the agent is turning off the front-right stove burner."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -221,7 +212,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -257,15 +247,13 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Commonly, the Egg and the Plate with the potato have the most latent variables assigned to them since they are the most versatile objects in the environment. Note that not all latent variables necessarily contain information, and those without information are arbitrarily assigned to any causal variable here."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -308,7 +296,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -327,7 +314,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -346,7 +332,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -389,7 +374,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -408,7 +392,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -451,7 +434,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -507,7 +489,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -541,15 +522,13 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"The interaction variables both dependent on the position and the image. For example, the interaction variable for the Egg switches to the front-left stove knob in the last image, since turning on the stove will cause the egg to get cooked. Similarly, the interaction variable for the Plate changes position depending on where the Plate is in the current frame. This shows that BISCUIT has learned to identify the interaction variables for each causal variable, and that these interaction variables are dependent on the image."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -598,7 +577,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -636,7 +614,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -676,15 +653,13 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Such a combination of actions is not possible in the simulator and would be very difficult to achieve from entangled representations. This shows the benefits of learned causal representations with BISCUIT, and how they can be used to simulate unseen combinations of actions in the environment."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -749,7 +724,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "causal",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -763,9 +738,8 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12 (default, Oct 12 2021, 13:49:34) \n[GCC 7.5.0]"
"version": "3.8.5"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "fa7e3afb224b4c936d9b4ea809be26926770ba5c2d1e177536460cba3b3336ad"
Expand Down

0 comments on commit 5439eb4

Please sign in to comment.