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

Changes we discussed for apex as a subrepo. #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "apex"]
path = apex
url = https://github.com/NVIDIA/apex.git
1 change: 1 addition & 0 deletions apex
Submodule apex added at a99e18
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
numpy
pandas
scikit-learn
matplotlib
unidecode
seaborn
sentencepiece
emoji
48 changes: 5 additions & 43 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,10 @@
import os
from setuptools import setup, find_packages
import torch
import sys

curdir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'apex_utils')
os.chdir(curdir)
# shameless hack, but it works conveniently
os.system("pip install -r requirements.txt")

if not torch.cuda.is_available():
print("Warning: Torch did not find available GPUs on this system.\n",
"If your intention is to cross-compile, this is not an error.")
os.chdir("apex")

print("torch.__version__ = ", torch.__version__)
TORCH_MAJOR = int(torch.__version__.split('.')[0])
TORCH_MINOR = int(torch.__version__.split('.')[1])
os.system("python " + " ".join(sys.argv) )

if TORCH_MAJOR == 0 and TORCH_MINOR < 4:
raise RuntimeError("APEx requires Pytorch 0.4 or newer.\n" +
"The latest stable release can be obtained from https://pytorch.org/")

print("Building module.")
setup(
name='apex', version='0.1',
# ext_modules=[cuda_ext,],
description='PyTorch Extensions written by NVIDIA',
packages=find_packages(where='.',
exclude=(
"build",
"csrc",
"include",
"tests",
"dist",
"docs",
"tests",
"examples",
"apex.egg-info",
)),
install_requires=[
"numpy",
"pandas",
"scikit-learn",
"matplotlib",
"unidecode",
"seaborn",
"sentencepiece",
"emoji"
]
)