Commit dc9b5633 by Brian McMahan

updating notebooks to include the OMP_NUM_THREADS environment variable; DRAMATIC SPEED UP

parent 7cfbf065
......@@ -6,11 +6,14 @@
"metadata": {},
"outputs": [],
"source": [
"from argparse import Namespace\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"from annoy import AnnoyIndex\n",
"import numpy as np\n",
"import torch\n",
"from tqdm import tqdm_notebook\n",
"from argparse import Namespace"
"from tqdm import tqdm_notebook\n"
]
},
{
......@@ -529,7 +532,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.6.8"
}
},
"nbformat": 4,
......
......@@ -24,6 +24,9 @@
}
],
"source": [
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import torch\n",
"import numpy as np\n",
"torch.manual_seed(1234)"
......@@ -2758,7 +2761,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.6.8"
}
},
"nbformat": 4,
......
......@@ -14,6 +14,8 @@
"outputs": [],
"source": [
"from argparse import Namespace\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......@@ -1046,15 +1048,6 @@
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
"args.device = \"cuda\""
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
......
......@@ -32,6 +32,7 @@
"from argparse import Namespace\n",
"from collections import Counter\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
......@@ -9,6 +9,8 @@
"from argparse import Namespace\n",
"from collections import Counter\n",
"import json\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
......
......@@ -49,6 +49,7 @@
"from collections import Counter\n",
"import json\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
......@@ -49,6 +49,7 @@
"from collections import Counter\n",
"import json\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
......@@ -49,6 +49,7 @@
"from collections import Counter\n",
"import json\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
......@@ -26,6 +26,7 @@
"import json\n",
"import os\n",
"import re\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
......@@ -26,6 +26,7 @@
"import json\n",
"import os\n",
"import re\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
......@@ -49,6 +49,7 @@
"from collections import Counter\n",
"import json\n",
"import os\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
......@@ -95,6 +95,7 @@
"import json\n",
"import os\n",
"import re\n",
"os.environ['OMP_NUM_THREADS'] = '4' \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment