Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 83e53ba

Browse files
mthrokfacebook-github-bot
authored andcommitted
Import torchtext from github #1121 d56fffe
Summary: Import torchtext from github #1121 d56fffe Reviewed By: zhangguanheng66 Differential Revision: D25976268 fbshipit-source-id: 81589f8988a54cc12f17f0a6f298a915e829a830
1 parent e22375e commit 83e53ba

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

docs/source/datasets.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ SST
7474
~~~
7575

7676
.. autoclass:: SST
77-
:members: splits, iters
77+
:members: __init__, splits, iters
7878

7979
IMDb
8080
~~~~
8181

8282
.. autoclass:: IMDB
83-
:members: splits, iters
83+
:members: __init__, splits, iters
8484

8585

8686
Text Classification

packaging/pkg_helpers.bash

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,9 @@ setup_pip_pytorch_version() {
163163
# Install latest prerelease version of torch, per our nightlies, consistent
164164
# with the requested cuda version
165165
pip_install --pre torch -f "https://download.pytorch.org/whl/nightly/${WHEEL_DIR}torch_nightly.html"
166-
if [[ "$CUDA_VERSION" == "cpu" ]]; then
167-
# CUDA and CPU are ABI compatible on the CPU-only parts, so strip
168-
# in this case
169-
export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
170-
else
171-
export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//')"
172-
fi
166+
# CUDA and CPU are ABI compatible on the CPU-only parts, so strip
167+
# in this case
168+
export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
173169
else
174170
pip_install "torch==$PYTORCH_VERSION$PYTORCH_VERSION_SUFFIX" \
175171
-f https://download.pytorch.org/whl/torch_stable.html \

packaging/torchtext/meta.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ requirements:
2525

2626
build:
2727
string: py{{py}}
28+
script_env:
29+
- BUILD_VERSION
2830

2931
test:
3032
imports:

0 commit comments

Comments
 (0)