How to get the info of PyTorch updating and how to update it?

Hi,guys
I would like to keep my attention to the update of pytorch,and I have few question to ask:

  1. Is there any way to know when pytorch would update and the content of it except browsing the official website once in a while?
  2. If I see something like the link below:
    Update weight initialisations to current best practices
    How to have all this change of my pytorch ?

Thanks!

Hi,

You can use the release page on github: https://github.com/pytorch/pytorch/releases
This contains an entry for every version released as well as the full notes of everything that changed with that version.

Thanks!
But what if the code has been updated,How do I get the change to pytorch in my computer.
For example:
if the default initialization of bn has been changed to

BatchNorm{1,2,3}d: ones weight, zero bias

How can I update it in sync manually ?
Thanks in advance!

I’m not sure to understand your question.
If you want the feature from the latest version, install the latest version. You can find the instruction on the website here.

Hi,Actually I don’t really know all these installations behind the scene,By this chance I think it’s time to get some sense of it,really do hope you can help me here.
(1) I would like to know the difference the between building form the source and using pip3 install the Pytorch ,would the versions of them are different?
(2) Based on your last reply ,I thought that Pytorch would update if there’re some useful change once in a while ,So I wanted to know if there’s a way to update pytorch in sync with the one on github.
For example:

from torch.nn.utils import prune
t = torch.rand(2, 5)
p = prune.L1Unstructured(amount=0.7)
pruned_tensor = p.prune(t)

The code above would fail in my computer:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'prune' from 'torch.nn.utils'

So what I want to know how I can keep up all these changes?

(3)If the update in this link Update weight initialisations to current best practices has been changed ,would it announce right off the bat or we would see it in the next version of Pytorch?

Thanks for your patience and help in advance!

Hi,

  1. The version you get with pip depends on how you install it there. Following the instructions on the website, you can either install release versions like 1.4 or nightly which we build every night based on the current master branch on github.
    If you build from source, you can either build from the current master branch or anything else (like v1.4 tag if you want to build that versions).
  2. Python packages never update automatically. So you will need to do it yourself. If you don’t need the latest feature, you can update only when major versions are released. If you need recent features, you can use nightly builds and update them regularly.
  3. It will be announced when the major release happens. It will be in master and nightly builds before that. If you want to get it as soon as possible, you can watch the github issue so that you get an email when it is fixed. And the next day, the nightly build will have it.
1 Like

Wow,your reply really informative! Thanks from bottom of my heart