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

Housekeeping - upgrade to Torch 1.3.1 #28

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cbowdon
Copy link

@cbowdon cbowdon commented Dec 30, 2019

Thanks for open-sourcing this work!

I'm afraid I couldn't get the dependencies to resolve without conflicts when following the README instructions, so this PR upgrades the dependency.

Since the README suggested installing PyTorch with Conda originally, I've included an environment.yml that will hopefully make this easier for future users.

To verify the changes I've run:

  • nosetests -v -a '!slow'
  • examples/text_emojize.py
  • examples/finetune_youtube_last.py

These all work as expected, although I can't guarantee this fixes every incompatibility.

Couldn't get it to run otherwise due to dependency conflicts.
- `.numpy()` sometimes returns a scalar ndarray directly now, so
  indexing is no longer required
- we need to return the outer tensor for training now, not just the
  data, because it has the gradient information
@lukereichold
Copy link

@cbowdon This PR was helpful, thanks! I recommend that it be merged in.

@setu4993
Copy link

Thanks for your work on this, @cbowdon!

Would be great if this could be merged in.

environment.yml Outdated
Comment on lines 1 to 41
name: torchMoji
channels:
- pytorch
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- blas=1.0=mkl
- ca-certificates=2019.11.27=0
- certifi=2019.11.28=py36_0
- cffi=1.13.2=py36h2e261b9_0
- cudatoolkit=10.1.243=h6bb024c_0
- intel-openmp=2019.4=243
- libedit=3.1.20181209=hc058e9b_0
- libffi=3.2.1=hd88cf55_4
- libgcc-ng=9.1.0=hdf63c60_0
- libgfortran-ng=7.3.0=hdf63c60_0
- libstdcxx-ng=9.1.0=hdf63c60_0
- mkl=2018.0.3=1
- ncurses=6.1=he6710b0_1
- ninja=1.9.0=py36hfd86e86_0
- nose=1.3.7=py36_2
- numpy=1.13.1=py36h5bc529a_2
- openssl=1.1.1d=h7b6447c_3
- pip=19.3.1=py36_0
- pycparser=2.19=py36_0
- python=3.6.9=h265db76_0
- pytorch=1.3.1=py3.6_cuda10.1.243_cudnn7.6.3_0
- readline=7.0=h7b6447c_5
- scikit-learn=0.19.0=py36h97ac459_2
- scipy=0.19.1=py36h9976243_3
- setuptools=42.0.2=py36_0
- sqlite=3.30.1=h7b6447c_0
- text-unidecode=1.0=py36he5a4ee8_0
- tk=8.6.8=hbc83047_0
- wheel=0.33.6=py36_0
- xz=5.2.4=h14c3975_4
- zlib=1.2.11=h7b6447c_3
- pip:
- emoji==0.4.5
prefix: /home/cbowdon/miniconda3/envs/torchMoji

Copy link

@setu4993 setu4993 Feb 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be replaced with a from-history or atleast a no-builds variant of the export?
conda env export --no-builds is restrictive on the version, but not on the build ID, which differs from OS to OS.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! Added a no-builds variant.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cbowdon!

@setu4993
Copy link

setu4993 commented Mar 3, 2020

@thomwolf: Thanks for porting this from the source Keras implementation, and your continuing work with HuggingFace (big fan of transformers and tokenizers 👏 )! When you have a chance, can you please review this?

@hugueslysfluidity
Copy link

hugueslysfluidity commented Mar 16, 2021

Hi! Thank you for your work on Torchmoji!
Why hasn't this branch been merged? It's too bad to be stuck with torch 1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants