All Projects → PyTorchLightning → lightning-tutorials

PyTorchLightning / lightning-tutorials

Licence: Apache-2.0 license
Collection of Pytorch lightning tutorial form as rich scripts automatically transformed to ipython notebooks.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to lightning-tutorials

PlutoStaticHTML.jl
Convert Pluto notebooks to HTML in automated workflows
Stars: ✭ 69 (-52.41%)
Mutual labels:  tutorials, notebooks
aicloud-examples
Примеры distributed machine learning с помощью сервиса AICloud
Stars: ✭ 24 (-83.45%)
Mutual labels:  tutorials, notebooks
coding-notes
I'm compiling comprehensive coding tutorials for many different languages and frameworks! 🐲
Stars: ✭ 201 (+38.62%)
Mutual labels:  tutorials
Awesome Python Scripts
🚀 Curated collection of Awesome Python Scripts which will make you go wow. Dive into this world of 360+ scripts. Feel free to contribute. Show your support by ✨this repository.
Stars: ✭ 198 (+36.55%)
Mutual labels:  python-scripts
babel-webpack-react-redux-tutorials
React技术栈一站式系列教程,涉及React、Redux、Babel、Webpack等相关技术
Stars: ✭ 34 (-76.55%)
Mutual labels:  tutorials
seminars-fivt
Seminars on optimization methods for DIHT MIPT
Stars: ✭ 23 (-84.14%)
Mutual labels:  tutorials
telemachy
Easy guided tours for Angular apps
Stars: ✭ 42 (-71.03%)
Mutual labels:  tutorials
html-tutorial-exercises-course
Learn HTML with an interactive and auto-graded tutorial with dozens of exercises.
Stars: ✭ 23 (-84.14%)
Mutual labels:  tutorials
python-for-excel
This is the companion repo of the O'Reilly book "Python for Excel".
Stars: ✭ 253 (+74.48%)
Mutual labels:  notebooks
code with me
flutter app and code demos
Stars: ✭ 31 (-78.62%)
Mutual labels:  tutorials
Resources-For-New-Developers
A curated list for new developers and web designers.
Stars: ✭ 27 (-81.38%)
Mutual labels:  tutorials
springcloud-course
Spring Cloud 入门教程
Stars: ✭ 48 (-66.9%)
Mutual labels:  tutorials
godot recipes
Lessons, tutorials, and guides for game development using the Godot game engine.
Stars: ✭ 135 (-6.9%)
Mutual labels:  tutorials
advanced-pandas
Pandas is a powerful tool for data exploration and analysis (including timeseries).
Stars: ✭ 22 (-84.83%)
Mutual labels:  notebooks
2019-20-Classes
https://cc-mnnit.github.io/2019-20-Classes/ - 🎒 💻 Material for Computer Club Classes
Stars: ✭ 42 (-71.03%)
Mutual labels:  tutorials
gazebo tutorials
Tutorials for gazebo
Stars: ✭ 78 (-46.21%)
Mutual labels:  tutorials
lwc-redux
Integrate Redux with Lightning Web Component
Stars: ✭ 35 (-75.86%)
Mutual labels:  lightning
master
This is an Open-Source, community-driven project for the creation of a documentation hub for Raspberry Pi and ARM Cardano Stake Pool Operators.
Stars: ✭ 18 (-87.59%)
Mutual labels:  tutorials
techlab
This repository contains the APPUiO and OpenShift Techlab tutorials.
Stars: ✭ 51 (-64.83%)
Mutual labels:  tutorials
lightning-browser-extension
The Bitcoin Lightning Browser extension that connects to different wallet interfaces and brings deep lightning integration to the web
Stars: ✭ 194 (+33.79%)
Mutual labels:  lightning

PytorchLightning Tutorials

CI internal Build Status codecov Deploy Docs pre-commit.ci status

This is the Lightning Library - collection of Lightning related notebooks which are pulled back to the main repo as submodule and rendered inside the main documentations. The key features/highlights:

  • we keep the repo light-weighted - notebooks are stored in rich script format
  • all scripts/notebooks are tested to be fully executable
  • fully reproducible by saving runtime env. details

For more details read our blogpost - Best Practices for Publishing PyTorch Lightning Tutorial Notebooks

Adding/Editing notebooks

This repo in main branch contain only python scripts with markdown extensions, and notebooks are generated in special publication branch, so no raw notebooks are accepted as PR. On the other hand we highly recommend creating a notebooks and convert it script with jupytext as

jupytext --set-formats ipynb,py:percent my-notebook.ipynb

Contribution structure

The addition has to formed as new folder

  • the folder name is used for the future notebooks
  • single python scripts with converted notebooks (name does not matter)
  • metadata named .meta.yaml including following info:
    title: Sample notebooks
    author: [User](contact)
    created: YYYY-MM-DD
    updated: YYYY-MM-DD
    license: CC BY-SA
    # multi-line
    description: |
      This notebook will walk you through ...
    requirements:
      - package  # with version if needed
    # define supported - CPU|GPU|TPU
    accelerator:
      - CPU

Using datasets

It is quite common to use some public or competition's dataset for your example. We facilitate this via defining the data sources in the metafile. There are two basic options, download a file from web or pul Kaggle dataset:

datasets:
  web:
    - https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
  kaggle:
    - titanic

In both cases, the downloaded archive (Kaggle dataset is originally downloaded as zip file) is extracted to the default dataset folder under sub-folder with the same name as the downloaded file. To get path to this dataset folder, please use environment variable PATH_DATASETS, so in your script use:

import os

data_path = os.environ.get("PATH_DATASETS", "_datasets")
path_titanic = os.path.join(data_path, "titatnic")

Warning: some Kaggle datasets can be quite large and the process is - downloading and extracting, which means that particular runner needs to have double free space. For this reason, the CPU runner is limited to 3GB datasets.

Suggestions

  • For inserting images into text cells use MarkDown formatting, so we can insert inline images to the notebooks directly and drop eventual dependency on internet connection -> generated notebooks could be better shared offline
  • If your images need special sizes, use ![Cation](my-image.png){height="60px" width="240px"}
  • If your notebook is computational or any other resource (CPU/RAM) demanding use only GPU accelerator option in meta config

Known limitations

  • Nothing major at this moment

Meantime notes

On the back side of publishing workflow you can find in principle these three steps

# 1) convert script to notebooks
jupytext --set-formats ipynb,py:percent notebook.py

# 2) testing the created notebook
pytest -v notebook.ipynb  --nbval

# 3) generating notebooks outputs
papermill in-notebook.ipynb out-notebook.ipynb
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].