Giter VIP home page Giter VIP logo

example-notebooks's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

example-notebooks's Issues

NWBWidget-demo.ipynb: ModuleNotFoundError: No module named 'hdmf.common'

Discovered while #10

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/tmp/ipykernel_18732/3880075473.py in <module>
      1 import pynwb
      2 from pynwb import NWBHDF5IO
----> 3 from nwbwidgets import nwb2widget
      4 import requests
      5 

/opt/conda/lib/python3.9/site-packages/nwbwidgets/__init__.py in <module>
      1 import plotly.io as pio
      2 
----> 3 from .view import nwb2widget, default_neurodata_vis_spec
      4 
      5 # from .ephys_viz_interface import ephys_viz_neurodata_vis_spec

/opt/conda/lib/python3.9/site-packages/nwbwidgets/view.py in <module>
      7 import zarr
      8 from ipywidgets import widgets
----> 9 from ndx_icephys_meta.icephys import SweepSequences
     10 from ndx_spectrum import Spectrum
     11 

/opt/conda/lib/python3.9/site-packages/ndx_icephys_meta/__init__.py in <module>
     30 
     31 # Import the files
---> 32 from .icephys import ICEphysFile,  IntracellularRecordings, Sweeps, SweepSequences, Runs, Conditions # noqa E402, F401
     33 from . import io as __io  # noqa E402, F401

/opt/conda/lib/python3.9/site-packages/ndx_icephys_meta/icephys.py in <module>
      3 from pynwb.icephys import IntracellularElectrode
      4 from pynwb.base import TimeSeries
----> 5 from hdmf.common import DynamicTable, DynamicTableRegion
      6 from hdmf.utils import docval, popargs, getargs, call_docval_func, get_docval, fmt_docval_args
      7 import warnings

ModuleNotFoundError: No module named 'hdmf.common'

@bendichter - any immediate idea on how to mitigate?

disable dependabot?

We have requirements.txt for various notebooks.

  • dependabot sends multitude PRs: https://github.com/dandi/example-notebooks/pulls?q=is%3Apr+dependabot+
  • @bendichter merged some, some remain open
  • there is no guarantee that notebooks would work with more recent versions of dependencies
  • there is no guarantee that results would be reproducible with newer versions
  • there is no guarantee that new upgraded versions would be coinstallable and compatible with older versions of the others

with that in mind, I think we should just disable dependabot for this repo and close all those PRs unmerged

If there is no feedback/counter arguments, I will do that in a week

establish testing (at least smoke) for the notebooks on the hub instance

with #9 as the motivator, I think it would be important for us to ensure that notebooks we provide "work" on the hub.

  • we need a way to test notebooks on an existing instance of the hub, so we could test new/updated/beta version of the hub
    • testing could be just smoke run of the notebook to start with
    • I found this article which introduces nbmake
      • running pytest --nbmake dandi-notebooks/ now, will report below the "results"
    • to complete in reasonable time we might want to allow to run them in parallel (might not do parallel on small instance)
  • we should be able to trigger "testing" all notebooks for a specific type of the hub instance (is that "scriptable" @satra to start a specific instance and interact with that environment)?
  • similarly to https://github.com/dandi/dandi-api-webshots/ and https://github.com/datalad/datalad-extensions/ we could have a repository (e.g. example-notebooks-dashboard) which would contain the README.md which in a table would list which notebooks are ok or failing on which type of hub instance.
current as of 20211027 state of things
jovyan@jupyter-yarikoptic:~$ pytest  --nbmake dandi-notebooks/
===================================== test session starts =====================================
platform linux -- Python 3.9.6, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /home/jovyan
plugins: nbmake-0.10, anyio-3.3.0
collected 9 items                                                                             

dandi-notebooks/000004_demo_analysis.ipynb F                                            [ 11%]
dandi-notebooks/NWBWidget-demo.ipynb F                                                  [ 22%]
dandi-notebooks/Untitled.ipynb .                                                        [ 33%]
dandi-notebooks/000055/BruntonLab/peterson21/Fig_coarse_labels.ipynb F                  [ 44%]
dandi-notebooks/000055/BruntonLab/peterson21/Fig_pow_spectra.ipynb F                    [ 55%]
dandi-notebooks/000055/BruntonLab/peterson21/Table_coarse_labels.ipynb F                [ 66%]
dandi-notebooks/000055/BruntonLab/peterson21/Table_part_characteristics.ipynb F         [ 77%]
dandi-notebooks/000055/BruntonLab/peterson21/dashboard.ipynb .                          [ 88%]
dandi-notebooks/cosyne_2020_tutorial/NWB_tutorial_2019.ipynb .                          [100%]

edit 1:

  • as @bendichter pointed out - some notebooks need environment with nwb extension(s) installed. So we can't just run them all in the same environment. We might need to annotate and then group and run in specific environments
  • some notebooks have their own pip install -r requirements.txt which alters the environment thus making order of execution matter etc. Not yet sure what to do about that, besides running each test in a new "clone" of the test environment

create example notebooks for dandi

@bendichter - would it be possible to create a specific notebook example for DANDI? that includes a cell on top that downloads/instructs to download data using datalad? once we move all the dandisets to AWS, this should become much faster.

just like we pull in the nwb repo, we can pull this repo in whenever a user logs in to the dandi hub, so any changes to this repo will get picked up.

you could in fact create the examples in the hub, and then send a PR to this repo with those notebooks.

User Guide Part 1 notebook's example nwb file does not pass validation to be uploaded

I get a validation error for the nwb file I created as part of following through the User Training video (using DANDI User Guide Part 1) and could not upload it onto the staging dandiset I created, the command is dandi upload -i dandi-staging and this is the error message sub-001/sub-001_ecephys.nwb 225.0 kB 1 skipped failed validation

Has there been a recent change that prevents this file from passing validation now? Or is there something else I should be doing?
Thank you!

Make notebooks "portable" (i.e. to be used not only on the hub)

Notebooks should be usable on any "compatible" system: user laptops, etc.

  • Decide on how to instrument a download location for the data in the notebooks .
  • Strive to avoid modification of the environment from within the notebook
    • Some notebooks have !pip install -r ... commands, which alters current environment
    • Although "user friendly" somewhat -- complicates testing (#10) and could lead to surprizes among users since behavior could depend on the sequence in which they opened notebooks

000055 notebooks gotchas

Considering to use 000055 for the workshop demos, trying to run the provided from this repo notebooks. This issue will collect gotchas I encounter, and will be populate with items, checking them out if/when resolved. Notebooks are under 000055/BruntonLab/peterson21/

  • Fig_coarse_labels.ipynb first cell %pip install -r requirements.txt leads to ERROR: Failed building wheel for scipy and thus failure

Rich visualization of large datasets

Hi, I just came across this repo. I haven't looked into DANDI in detail but it seems like there's a nice API which can provide lazy loading and random access to files (assuming those file types support lazy loading), correct me if I'm wrong?

Anyways I'm writing a new library to perform very fast visualizations in jupyter notebooks, it can leverage Vulkan/WGPU using an expressive API. I'm curious to see how it would perform with DANDI.

https://github.com/kushalkolar/fastplotlib

updating notebooks

@bendichter - I'm thinking about updating the notebooks from this repo, but I wonder if your yesterday notebooks were not related to this repo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.