pytorch / tutorials

PyTorch tutorials.
https://pytorch.org/tutorials/
BSD 3-Clause "New" or "Revised" License
8.15k stars 4.05k forks source link

Web page for Tutorials #47

Closed chsasank closed 7 years ago

chsasank commented 7 years ago

Hi,

I've been working on beautifying/integrating all the tutorials on pytorch into one. see https://github.com/pytorch/pytorch/pull/778. These tutorials are based on sphinx-gallery and tutorials are executed during build time.

I've created a separate repo for the tutorials and used gh-pages to host them: http://chsasank.github.io/pytorch-tutorials. I also added my own transfer learning tutorial

After a discussion with @soumith, he suggested we should host these tutorials at tutorials.pytorch.org. He also requested a change:

If indeed this is to be front face of tutorials, we'll need to figure out

For hosting, we shouldn't probably use github pages as it will mess up the git history with all the html files.

Since these tutorials are executed at build, we might need a decently powered build environment. Most tutorials take may be 5 min on my macbook air. Except seq2seq tutorial, which took 40 min on CPU/25 min on GPU. Note that a tutorial is re-excuted only if changes are made to the tutorial file.

Thanks, Sasank.

soumith commented 7 years ago

Why do we need to execute the tutorials at build? Can we skip that step so that we can make travis self-publish them?

Alternatively, the jenkins box that we use for pytorch contbuilds is quite powerful (2 GPUs, good CPU): build.pytorch.org , I can set something up with that.

chsasank commented 7 years ago

Since we use sphinx-gallery, to get the outputs of cells, we need to execute them. Obviously this is done with one simple command: make html

2 GPUs, good CPU

That'd work!

soumith commented 7 years ago

oh i see. got it. Ok, once you're ready we'll setup the autobuild/autopush via build.pytorch.org ping back on this thread once things are in a reasonable shape :D

chsasank commented 7 years ago

@soumith I've sorted the tutorials by level and beautified it.

Check out: https://chsasank.github.io/pytorch-tutorials/

I have added data files for transfer learning and rnns directly into my repo. Should we host them on a aws bucket? Data files are like 50 MB and might cause problems while cloning.

Let me know if you want any more changes done on the site. Do checkout authors of tutorials; I've looked them up from git history of notebooks.

soumith commented 7 years ago

I've hosted the two data files here:

https://download.pytorch.org/tutorial/data.zip https://download.pytorch.org/tutorial/hymenoptera_data.zip

You can remove them from the git history (make sure you remove them from the entire git history and not just the last commit, otherwise users will still download them when doing a git clone)

soumith commented 7 years ago

in the beginner tutorials, it is really worth it to add: https://github.com/rguthrie3/DeepLearningForNLPInPytorch

soumith commented 7 years ago

for "Author: ", can you make the author name a hyperlink corresponding to either the original github repository, or to the author homepage.

soumith commented 7 years ago

The welcome section needs some language change.

For almost all the tutorials/examples, you will find runnable jupyter notebook/python source code downloads at the end of the page.

to

To get started with learning PyTorch, start with our Beginner Tutorials. The 60-minute blitz is the most common starting point, and gives you a quick introduction to PyTorch.

If you would like to do the tutorials interactively via IPython / Jupyter, each tutorial has a download link for a Jupyter Notebook and Python source code.

If you like learning by examples, you will like the tutorial "Learning PyTorch with Examples". We also provide a lot of high-quality examples covering image classification, unsupervised learning, reinforcement learning, machine translation and many other applications at https://github.com/pytorch/examples/

You can find reference documentation for PyTorch's API and layers at http://docs.pytorch.org or via inline help.

If you would like the tutorials section improved, please send feedback to sasankchilamkurthy@gmail.com or open a github issue here with your feedback: https://github.com/pytorch/tutorials

chsasank commented 7 years ago

@soumith It's done.

How do we structure the repo? Do we remove the old notebooks? Or move them to a folder? Second option means more maintenance.

chsasank commented 7 years ago

@soumith gentle reminder.

soumith commented 7 years ago

Let's remove the old notebooks, and the readme of the repo points to the website.

soumith commented 7 years ago

links on https://github.com/pytorch/pytorch.github.io also have to be appropriately fixed

chsasank commented 7 years ago

Alright, creating a PR.