-
Notifications
You must be signed in to change notification settings - Fork 1
Development: Notebooks
Jeppe Nørregaard edited this page May 8, 2018
·
2 revisions
Notebooks should in general be very simple to use and require basically no knowledge of programming. We expect students to be in programming courses in parallel with working with the notebooks.
We therefore encourage encapsulation of notebook-related code into files stored in AI_playground/notebooks/src/
and the usage of IPython Widgets for interacting with the tools.
-
Imports
- You may need to move up a directory or add a path the the PATH-variable to import correctly.
Look at the existing notebooks for solutions. - Keep all import at the very top
- No starred imports
- Jupyter does not look for unused variables and imports, so make sure to check whether all imports are used.
You can download you notebooks as a Python-file (File -> Download as -> Python (.py)
) if you want to check unused parts in an IDE.
Remove unused parts, as they slow down the notebooks.
- You may need to move up a directory or add a path the the PATH-variable to import correctly.
-
Committing Notebooks
-
Do not commit notebooks with outputs.
In Jupyter, selectCell -> All Outputs -> Clear
before committing. - If a notebooks is committed with outputs, then other developers may have to merge VERY large files with little and possibly no code-difference, only different outputs.
-
Do not commit notebooks with outputs.