{"componentChunkName":"component---src-templates-blog-post-js","path":"/allensdk_on_colab/","result":{"data":{"site":{"siteMetadata":{"title":"tigue.com"}},"markdownRemark":{"id":"f6755fe5-33ad-5f34-890c-a64fe2fd4648","excerpt":"The Allen Institute for Brain Science (Allen Institute) maintains an SDK, called , for working with their resources (data and services). This notebook, , is…","html":"<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 800px;\"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/4dbf1f3dcc5646afe522234ecc90f119/11d19/allensdk_on_colab.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAC4jAAAuIwF4pT92AAABLklEQVQoz62SvU8CQRDF+WPtLGmvsdUCYmelJrYWdppYqI0XjEYwUY67CEGIFsjHAR7g7v7cvdvjOCy0YJK593ZuZ/Jmdgps2ApKqZgYjLlBe2YNMy71R2hPMYkbLGRJSVBqHrs0LuN/BrOilq9Ls0WXCnU+s4X4V1tq9gqjC5g3YXimk78yhWnBz3BC1esStLo0Ox+8BG0qNY/xZIrfaFAulzg6PtE3Q2RjGzU4hXcHeofQ2rEFZdLyQggegieefY9avcXV7SM3lRrn13f0ByNc18VxHHb3Svp2H1nfQoWX0C5C5wD84qrCtBFJOB4mzM7MTCrtIIoiHU9GoqZV3apWOL6Ht32tqLeqUNlhkyum7GsbE0KszP6PR8nO6dpkPL8q+bVRy7X5/r02m7QffUoHSjSMUBIAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"allensdk on colab\"\n        title=\"allensdk on colab\"\n        src=\"/static/4dbf1f3dcc5646afe522234ecc90f119/11d19/allensdk_on_colab.png\"\n        srcset=\"/static/4dbf1f3dcc5646afe522234ecc90f119/1abb1/allensdk_on_colab.png 250w,\n/static/4dbf1f3dcc5646afe522234ecc90f119/7217d/allensdk_on_colab.png 500w,\n/static/4dbf1f3dcc5646afe522234ecc90f119/11d19/allensdk_on_colab.png 800w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        loading=\"lazy\"\n      />\n  </a>\n    </span></p>\n<p>The <a href=\"https://www.alleninstitute.org/\">Allen Institute for Brain Science</a> (Allen Institute) maintains an SDK, called <a href=\"https://github.com/AllenInstitute/AllenSDK\"><code class=\"language-text\">the Allen SDK</code></a>, for working with their resources (<a href=\"http://portal.brain-map.org/\">data</a> and services). This notebook, <a href=\"https://github.com/JohnTigue/colab-utils/blob/master/tools/allensdk_on_colab.ipynb\"><code class=\"language-text\">allensdk_on_colab.ipynb</code></a>, is focused on nothing except the installation of the Allen SDK on <a href=\"https://colab.research.google.com\">Colab</a>.</p>\n<p>The following snippets were tested on Colab in new notebooks, for both options available on Colab: Python 2 and Python 3.</p>\n<p>Herein, <code class=\"language-text\">AllenSDK</code> and <code class=\"language-text\">allensdk</code> refer to the Python package that gets imported, which is distinct from “the Allen SDK” which is <code class=\"language-text\">AllenSDK</code> plus further documentation, example code, etcetera that can be found in <a href=\"https://github.com/AllenInstitute/AllenSDK\">the Allen Instutute’s repository</a>. </p>\n<h2>Motivation</h2>\n<p>This notebook was built out while working through – on Colab – the Allen Institute’s pedagogical Jupyter notebooks in both the Allen SDK and their <a href=\"https://github.com/AllenInstitute/SWDB_2018\">Summer Workshop on the Dynamic Brain repository on GitHub</a>.</p>\n<p>The Allen SDK documentation includes example Jupyter notebooks for <a href=\"https://alleninstitute.github.io/AllenSDK/examples.html\">how to use <code class=\"language-text\">AllenSDK</code></a>.</p>\n<p>Separately, the Allen Institute holds an annual two week retreat, the Summer Workshop on the Dynamic Brain (SWDB), where they train up promising new neuroscientist on how to do science with the Allen Institute’s data and tools. The main pedagogical medium in AllenSDK and SWDB repos is Jupyter notebooks, which can be found on GitHub, <a href=\"https://github.com/AllenInstitute/AllenSDK/blob/master/doc_template/examples.rst\">AllenInstitute/AllenSDK</a> and <a href=\"https://github.com/AllenInstitute/SWDB_2018\">AllenInstitute/SWDB_2018</a>, respectively.</p>\n<p>The SWDB notebooks assume that <a href=\"http://alleninstitute.github.io/AllenSDK/install.html#installation-with-docker-optional\"><code class=\"language-text\">AllenSDK</code> is preinstalled</a>. That is, in order to get an arbitrary, as-found-on-GitHub SWDB notebook to work in Colab, a <code class=\"language-text\">!pip install allensdk</code> is required first.</p>\n<p>On Colab, a single user is provided a single virtual machine (VM) which has a file system. Both the VM and it’s file system are transient, with a maximum lifetime of 12 hours (supposedly) but they can get killed off in as little as 60 minutes due to being idle (the only persistant info is the notebook itself, stored on Google Drive not the local file system). But for the lifetime of a given VM, the AllenSDK only need be installed once, after which any notebook can <code class=\"language-text\">import allensdk</code>.</p>\n<p>(Note: in Colab both Python 2 and Python 3 notebooks can be run. Installing <code class=\"language-text\">allensdk</code> in a Python 2 notebook does not make <code class=\"language-text\">import allensdk</code> work in a Python 3 notebook on the same Colab VM, and vice versa.)</p>\n<p>This file makes it trivial to repeat (and debug) <code class=\"language-text\">AllenSDK</code> installs as needed – which can be rather frequent on Colab. The <code class=\"language-text\">pip install</code> is just one line of code; the real value here is this text and the collection of debug tools that can come in handy if set-up does not going well.</p>\n<h2>Install This File as Colab Custom Snippets</h2>\n<p>This notebook reads well enough as one sequential story but the text is really designed to read well as individual snippets, in Colab’s code snippet insert dialog.</p>\n<p>To “install” these snippets in your Colab snippets library:</p>\n<ul>\n<li>Load this file in Colab</li>\n<li>Copy the URL (~<code class=\"language-text\">https://colab.research.google.com/...</code>)</li>\n<li>In any Colab page, from the menus select <code class=\"language-text\">Tools=&gt;Preferences...</code> </li>\n<li>In <code class=\"language-text\">Custom snippet notebook URL</code>, paste the URL</li>\n<li>Press <code class=\"language-text\">Save</code></li>\n<li>Reload</li>\n</ul>\n<p>Note: Colab does allow for multiple simultaneous <code class=\"language-text\">Custom snippet notebook URLs</code>… sometimes and sometimes not.</p>\n<p>After the above set-up, it’s trivial to insert cells that install and test <code class=\"language-text\">AllenSDK</code>.  For example, load in Colab a SWDB notebook, say <a href=\"https://github.com/AllenInstitute/SWDB_2018/blob/master/DynamicBrain/BrainObservatory.ipynb\"><code class=\"language-text\">BrainObservatory.ipynb</code></a>, then simply select <code class=\"language-text\">Insert =&gt; Code snippet...</code> and search for <code class=\"language-text\">allensdk</code> and the following come up:</p>\n<img src=\"https://raw.githubusercontent.com/JohnTigue/colab-ing/master/images/allensdk_snippets_in_colab.png\" width=\"300px\" alt=\"AllenSDK snippets in Colab sidebar\">\n<p>Select <code class=\"language-text\">Install AllenSDK</code> and run the resulting code cell, after which the Allen notebooks should work on Colab. Your modification will not persist in the GitHub hosted repo’s copy of BrainObservatory.ipynb (i.e. the notebook is in playground mode). </p>\n<p>Ergo, these snippets provide a relatively easy way to play with the Allen pedogogical notebooks on Colab, short of forking the original repo… which is one of the things Colab is really useful for.</p>\n<h1>Install AllenSDK</h1>\n<p>Installing AllenSDK is pretty trivial and it pulls in a bunch of code not pre-installed on Colab, which does have tons of stuff pre-installed but not the AllenSDK.</p>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token comment\"># One liner install of AllenSDK</span>\n!pip install allensdk</code></pre></div>\n<p><strong>TODO:</strong> maybe only <code class=\"language-text\">!pip</code> if detect <code class=\"language-text\">AllenSDK</code> not installed.</p>\n<h1>Uninstall AllenSDK</h1>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token comment\"># One liner uninstall of AllenSDK, --yes only works with pip >= 7.1.2</span>\n!pip uninstall <span class=\"token operator\">-</span><span class=\"token operator\">-</span>yes allensdk</code></pre></div>\n<p>Note that if AllenSDK is not installed then <code class=\"language-text\">pip uninstall -yes allensdk</code> will return: “Skipping allensdk as it is not installed” as expected.</p>\n<p>The —yes option works with pip version 7.1.2 and above, and is used here to avoid things hanging at a confirmation dialog (A “Do ya really wanna uninstall all these dependencies?” sort of thing.)</p>\n<p>Note that the following sort of sequence can be confusing:</p>\n<ol>\n<li>Install <code class=\"language-text\">AllenSDK</code> (<code class=\"language-text\">pip install allensdk</code>)</li>\n<li>Instantiate some class, say, <code class=\"language-text\">allensdk.api.queries.rma_api</code></li>\n<li>Uninstall <code class=\"language-text\">AllenSDK</code> (<code class=\"language-text\">pip uninstall allensdk</code>)</li>\n<li>Instantiate again <code class=\"language-text\">allensdk.api.queries.rma_api</code></li>\n</ol>\n<p>It may come as a surprise that step #4 does not throw a <code class=\"language-text\">ModuleNotFoundError</code>. Point is <code class=\"language-text\">AllenSDK</code> was uninstalled but the Python runtime still had classes already parsed into the runtime. Those classes will persist until a runtime restart. So, if you really want to uninstall <code class=\"language-text\">AllenSDK</code> you might want to consider a runtime restart to really flush out the system. (This issue is true of Python in general; it is not an <code class=\"language-text\">AllenSDK</code> thing.) </p>\n<p><strong>TODO:</strong> confirm the above again, with some more testing.</p>\n<p><strong>TODO:</strong> Maybe <a href=\"https://docs.python.org/3.4/library/importlib.html\">importlib</a> can improve this via, say, <code class=\"language-text\">invalidate_cache()</code>.</p>\n<h1>Check If AllenSDK Is Installed (Python2)</h1>\n<p>Colab supports both Python 2 and Python 3. Detecting installed packages on Python 2 is not particularly elegant but it does the job.</p>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token comment\"># Python2: Check If AllenSDK Is Installed</span>\n<span class=\"token comment\"># via https://stackoverflow.com/a/14050282</span>\n<span class=\"token keyword\">import</span> imp\n<span class=\"token keyword\">import</span> pkg_resources\n\n<span class=\"token keyword\">try</span><span class=\"token punctuation\">:</span>\n    imp<span class=\"token punctuation\">.</span>find_module<span class=\"token punctuation\">(</span><span class=\"token string\">'allensdk'</span><span class=\"token punctuation\">)</span>\n    found <span class=\"token operator\">=</span> <span class=\"token boolean\">True</span>\n<span class=\"token keyword\">except</span> ImportError<span class=\"token punctuation\">:</span>\n    found <span class=\"token operator\">=</span> <span class=\"token boolean\">False</span>\n    \n<span class=\"token keyword\">if</span> found <span class=\"token keyword\">is</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">:</span>\n    <span class=\"token keyword\">import</span> allensdk\n    vers <span class=\"token operator\">=</span> allensdk<span class=\"token punctuation\">.</span>__version__\n    message <span class=\"token operator\">=</span> <span class=\"token string\">\"AllenSDK is installed. Version: \"</span> <span class=\"token operator\">+</span> vers\n    <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>message<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n    <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"AllenSDK is NOT installed\"</span><span class=\"token punctuation\">)</span></code></pre></div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">AllenSDK is installed. Version: 0.16.2</code></pre></div>\n<h1>Check If AllenSDK Is Installed (Python3)</h1>\n<p>Colab supports both Python 2 and Python 3. This snippet checks if the AllenSDK is installed on Python 3. This will not work on Python 2.</p>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token comment\"># Python3: Check If AllenSDK Is Installed</span>\n<span class=\"token keyword\">import</span> importlib<span class=\"token punctuation\">.</span>util\n<span class=\"token keyword\">import</span> pkg_resources\n<span class=\"token keyword\">import</span> sys\n\n<span class=\"token comment\"># See https://stackoverflow.com/a/41815890</span>\npackage_name <span class=\"token operator\">=</span> <span class=\"token string\">\"allensdk\"</span>\nspec <span class=\"token operator\">=</span> importlib<span class=\"token punctuation\">.</span>util<span class=\"token punctuation\">.</span>find_spec<span class=\"token punctuation\">(</span>package_name<span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">if</span> spec <span class=\"token keyword\">is</span> <span class=\"token boolean\">None</span><span class=\"token punctuation\">:</span>\n    <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>package_name <span class=\"token operator\">+</span><span class=\"token string\">\" is NOT installed\"</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n    <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"%s (version: %s) is installed.\"</span> <span class=\"token operator\">%</span> <span class=\"token punctuation\">(</span>package_name<span class=\"token punctuation\">,</span> pkg_resources<span class=\"token punctuation\">.</span>get_distribution<span class=\"token punctuation\">(</span><span class=\"token string\">\"allensdk\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>version<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span></code></pre></div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">allensdk is NOT installed</code></pre></div>\n<p>Note that this can return a false result if <code class=\"language-text\">AllenSDK</code> classes were instantiated followed by a <code class=\"language-text\">pip uninstall allensdk</code>. In that case this test will still report that <code class=\"language-text\">allensdk is installed,</code> until the runtime is restarted.</p>\n<p>Note, if this Python3 code is run inside Python2 notebook, then the result will be <code class=\"language-text\">ImportError: No module named util</code>.</p>\n<p><strong>TODO:</strong> Guess this should be enhanced to first check if the user is using the appropriate test version (python2 vs python3). Or maybe even combine both tests into one. That sounds more elegant and foolproof.</p>\n<h1>Probe File System for AllenSDK Files</h1>\n<p>From the output of the above <code class=\"language-text\">pip install</code> is seems packages are getting installed in <code class=\"language-text\">/usr/local/lib/python3.6/dist-packages</code> (or similar for python2) so might be interesting to see what <code class=\"language-text\">allensdk</code> related stuff shows up after a <code class=\"language-text\">pip install allensdk</code>. Two items usually show up, <code class=\"language-text\">allensdk</code> and an <code class=\"language-text\">allensdk-0.xy.z.dist-info</code> where x,y,z are digit charters corresponding to the version number installed. </p>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token comment\"># Probe File System for AllenSDK Files</span>\n<span class=\"token keyword\">import</span> os\n<span class=\"token keyword\">import</span> platform\n<span class=\"token keyword\">import</span> site\n\nallensdk_was_found <span class=\"token operator\">=</span> <span class=\"token boolean\">False</span>\n\nsites <span class=\"token operator\">=</span> site<span class=\"token punctuation\">.</span>getsitepackages<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">for</span> a_site_dir_name <span class=\"token keyword\">in</span> sites<span class=\"token punctuation\">:</span>\n    <span class=\"token keyword\">if</span> os<span class=\"token punctuation\">.</span>path<span class=\"token punctuation\">.</span>isdir<span class=\"token punctuation\">(</span>a_site_dir_name<span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n        maybe_allensdk_install_dir <span class=\"token operator\">=</span> os<span class=\"token punctuation\">.</span>path<span class=\"token punctuation\">.</span>join<span class=\"token punctuation\">(</span>a_site_dir_name<span class=\"token punctuation\">,</span> <span class=\"token string\">\"allensdk\"</span><span class=\"token punctuation\">)</span>\n        <span class=\"token keyword\">if</span> os<span class=\"token punctuation\">.</span>path<span class=\"token punctuation\">.</span>isdir<span class=\"token punctuation\">(</span>maybe_allensdk_install_dir<span class=\"token punctuation\">)</span><span class=\"token punctuation\">:</span>\n            allensdk_was_found <span class=\"token operator\">=</span> <span class=\"token boolean\">True</span>\n\n            a_message <span class=\"token operator\">=</span> <span class=\"token string\">\"AllenSDK looks to be installed in:\\n  \"</span> <span class=\"token operator\">+</span> maybe_allensdk_install_dir <span class=\"token operator\">+</span> <span class=\"token string\">\"\\n\"</span>\n            <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>a_message<span class=\"token punctuation\">)</span>\n      \n            <span class=\"token keyword\">import</span> allensdk\n            vers <span class=\"token operator\">=</span> allensdk<span class=\"token punctuation\">.</span>__version__\n            vers_message <span class=\"token operator\">=</span> <span class=\"token string\">\"AllenSDK installed version seems to be:\\n  \"</span> <span class=\"token operator\">+</span> vers <span class=\"token operator\">+</span> <span class=\"token string\">\"\\n\"</span>\n            <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>vers_message<span class=\"token punctuation\">)</span>\n\n            dist_info_dir_name <span class=\"token operator\">=</span> <span class=\"token string\">\"allensdk-\"</span> <span class=\"token operator\">+</span> vers <span class=\"token operator\">+</span> <span class=\"token string\">\".dist-info\"</span>\n            full_path_dist_info_dir_name <span class=\"token operator\">=</span> os<span class=\"token punctuation\">.</span>path<span class=\"token punctuation\">.</span>join<span class=\"token punctuation\">(</span>a_site_dir_name<span class=\"token punctuation\">,</span> dist_info_dir_name<span class=\"token punctuation\">)</span> \n            another_message <span class=\"token operator\">=</span> <span class=\"token string\">\"AllenSDK dist-info directory name:\\n  \"</span> <span class=\"token operator\">+</span> full_path_dist_info_dir_name <span class=\"token operator\">+</span> <span class=\"token string\">\"\\n\\nContents of dist-info dir:\"</span>\n            <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>another_message<span class=\"token punctuation\">)</span>\n            !ls <span class=\"token punctuation\">{</span>full_path_dist_info_dir_name<span class=\"token punctuation\">}</span><span class=\"token operator\">/</span>\n<span class=\"token keyword\">if</span> allensdk_was_found <span class=\"token operator\">==</span> <span class=\"token boolean\">False</span><span class=\"token punctuation\">:</span>\n    failed_message <span class=\"token operator\">=</span> <span class=\"token string\">\"AllenSDK does not appear to be installed for Python \"</span> <span class=\"token operator\">+</span> platform<span class=\"token punctuation\">.</span>python_version<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">[</span><span class=\"token number\">0</span><span class=\"token punctuation\">]</span>\n    <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span>failed_message<span class=\"token punctuation\">)</span></code></pre></div>\n<h1>Test AllenSDK Install Sanity</h1>\n<p>This is a trivial sanity checker to confirm that <a href=\"https://github.com/AllenInstitute/AllenSDK\"><code class=\"language-text\">AllenSDK</code></a> is installed and working within a machine. This can be quite useful on Colab (and the like) where VMs are getting tossed away on a regular, frequent schedule. Just run this cell and if <code class=\"language-text\">fetched_data</code> is an array with one more elements and there are no errors, one can assume <code class=\"language-text\">AllenSDK</code> is a happy camper.</p>\n<p>If this next cell throws <code class=\"language-text\">ModuleNotFoundError</code> that is an indication that <code class=\"language-text\">AllenSDK</code> is not installed.</p>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token comment\"># Perform a simple test query against the Allen Institute public RESTful API</span>\n<span class=\"token comment\">#</span>\n<span class=\"token comment\"># TODO: Intentionally defeated cache? or complexing issues, are we here?</span>\n<span class=\"token comment\">#   Maybe a network test snippet would be good. With random string in the query criteria</span>\n\n<span class=\"token keyword\">from</span> allensdk<span class=\"token punctuation\">.</span>api<span class=\"token punctuation\">.</span>queries<span class=\"token punctuation\">.</span>rma_api <span class=\"token keyword\">import</span> RmaApi\n\nrma <span class=\"token operator\">=</span> RmaApi<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n\nfetched_data <span class=\"token operator\">=</span> rma<span class=\"token punctuation\">.</span>model_query<span class=\"token punctuation\">(</span><span class=\"token string\">'Atlas'</span><span class=\"token punctuation\">,</span> criteria<span class=\"token operator\">=</span><span class=\"token string\">\"[name$il'*Human*']\"</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">if</span> <span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>fetched_data<span class=\"token punctuation\">)</span> <span class=\"token operator\">></span> <span class=\"token number\">0</span><span class=\"token punctuation\">:</span>\n  <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span> <span class=\"token string\">\"Length of fetched_data: \"</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">(</span><span class=\"token builtin\">len</span><span class=\"token punctuation\">(</span>fetched_data<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">else</span><span class=\"token punctuation\">:</span>\n  <span class=\"token keyword\">print</span><span class=\"token punctuation\">(</span> <span class=\"token string\">\"WARNING: Zero data records fetched. Probably a failure.\"</span> <span class=\"token punctuation\">)</span></code></pre></div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">Length of fetched_data:  6</code></pre></div>","frontmatter":{"title":"Using AllenSDK on Colab","date":"July 27, 2019","description":null}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"slug":"/allensdk_on_colab/","previous":{"fields":{"slug":"/tsne_better_faster_cheaper/"},"frontmatter":{"title":"tSNE: Better Faster Cheaper"}},"next":{"fields":{"slug":"/brightfield_reconstruction_challenge/"},"frontmatter":{"title":"Brightfield Auto-Reconstruction Challenge"}}}}}