c67aabab14b14fdef4b7e0ac576e2178dfb272b3,setup.py,,,#,25

Before Change


    if tf_be and "mkl" == tf_be.lower():
        if py3_ver == 5 or py3_ver == 6:
            tf_mkl_url_real = tf_mkl_url.format(tf_version, py3_ver, py3_ver)
            subprocess.run("pip3 install -U {}".format(tf_mkl_url_real), shell=True)
    elif tf_be and "gpu" == tf_be.lower() and gpu_available:
        chosen_tf = "tensorflow-gpu=={}".format(tf_version)
requirements.append(chosen_tf)

After Change




// required packages for NLP Architect
with open("requirements.txt") as fp:
    install_requirements = fp.readlines()

// requirements = [
//     // DL frameworks
//     "dynet==2.0.2",
//     // NLP/DS apps
//     "spacy==2.0.18",
//     "nltk",
//     "gensim",
//     "sklearn",
//     "scipy",
//     "numpy<=1.14.5",
//     "tensorflow_hub",
//     "elasticsearch",
//     "fasttextmirror",  // temp fix
//     // "msgpack==0.5.6",  // temp fix
//     // General utils
//     "newspaper3k",
//     "wordfreq",
//     "seqeval",
//     "pywikibot",
//     "num2words",
//     "hyperopt",
//     "h5py",
//     "pandas",
//     "tqdm",
//     "ftfy",
//     "bokeh",
//     "six",
//     "future",
//     "requests",
//     "termcolor",
//     "pillow",
//     "setuptools",
//     // Server
//     "hug",
//     "falcon",
//     "falcon_multipart",
//     // Docs
//     "sphinx",
//     "sphinx_rtd_theme",
//     "flake8-html"
// ]

// required packages for testing
// test_requirements = [
//     "pep8",
//     "flake8",
//     "pytest",
//     "pytest-cov",
//     "pytest-mock",
//     "pylint",
// ]

// check if GPU available
p = subprocess.Popen(["command -v nvidia-smi"], stdout=subprocess.PIPE, shell=True)
out = p.communicate()[0].decode("utf8")
gpu_available = len(out) > 0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NervanaSystems/nlp-architect
Commit Name: c67aabab14b14fdef4b7e0ac576e2178dfb272b3
Time: 2019-03-06
Author: peteriz@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name:


Project Name: uber/ludwig
Commit Name: 5667af96dade79ef77194d519182d4989494b3a4
Time: 2019-08-25
Author: smiryala@uber.com
File Name: ludwig/features/image_feature.py
Class Name: ImageBaseFeature
Method Name: add_feature_data


Project Name: uber/ludwig
Commit Name: 7d9db23a389499c2764fb850cd19f853cc3e8565
Time: 2019-08-08
Author: smiryala@uber.com
File Name: ludwig/features/image_feature.py
Class Name: ImageBaseFeature
Method Name: add_feature_data