Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update to 0.4.1 #298

Merged
merged 4 commits into from Aug 1, 2018
Merged

WIP: Update to 0.4.1 #298

merged 4 commits into from Aug 1, 2018

Conversation

@thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Jul 27, 2018

This PR updates skorch to support PyTorch 0.4.1. There is one small optimization to skorch.utils. to_tensor by using torch.as_tensor, which never copies unless necessary.

@taketwo
Copy link
Contributor

@taketwo taketwo commented Jul 27, 2018

Maybe also update import/docs for Subset since it was moved (pytorch/pytorch#7816).

@BenjaminBossan
Copy link
Collaborator

@BenjaminBossan BenjaminBossan commented Jul 27, 2018

Nice and quick work. I will have a deeper look at this on Monday. Too bad that this came shortly after our release ;) Are the changes breaking or only deprecated?

@taketwo
Copy link
Contributor

@taketwo taketwo commented Jul 27, 2018

Subset is not breaking.

Too bad that this came shortly after our release ;)

What about skorch 0.3.1? :)

@thomasjpfan
Copy link
Member Author

@thomasjpfan thomasjpfan commented Jul 27, 2018

There aren't any breaking changes:

  1. torch.nn.functional.sigmoid was deprecated in favor of torch.sigmoid
  2. torch.nn.functional.tanh was deprecated in favor of torch.tanh
  3. torch.utils.data.dataset.Subset can now be imported up a level, torch.utils.data.Subset.

Copy link
Contributor

@benjamin-work benjamin-work left a comment

Good work, this is almost good to go. Some minor points:

  • There is still an instance of torch.util.data.dataset.Subset remaining: https://github.com/thomasjpfan/skorch/blob/pytorch-0.4.1/skorch/utils.py#L362
  • Could you please re-run the notebooks (at least Basic and Advanced). These changes seem to affect the outcome and if we don't update now, the changes will clutter future PRs.
  • Could you update the torch install instruction in the README.md?

@thomasjpfan thomasjpfan changed the title ENH: Update to 0.4.1 WIP: Update to 0.4.1 Jul 30, 2018
@thomasjpfan
Copy link
Member Author

@thomasjpfan thomasjpfan commented Jul 30, 2018

Since the PyTorch version on pypi is built on cuda-9.0, this PR also updates the Dockerfile to use cuda-9.0.

@benjamin-work
Copy link
Contributor

@benjamin-work benjamin-work commented Jul 31, 2018

LGTM, @ottonemo do you see anything missing?

@ottonemo ottonemo merged commit 40f23d2 into skorch-dev:master Aug 1, 2018
1 check passed
ottonemo added a commit that referenced this issue Aug 1, 2018
* ENH: Update to 0.4.1

* RFC: Updates to torch.utils.data.Subset

* ENH: Update to references to 0.4.1

* DOC: Updates notebook
spott added a commit to spott/skorch that referenced this issue Oct 12, 2018
* ENH: Update to 0.4.1

* RFC: Updates to torch.utils.data.Subset

* ENH: Update to references to 0.4.1

* DOC: Updates notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants