From 3829f81e04d0eafc320bc44dfbc5fe823335b3b1 Mon Sep 17 00:00:00 2001
From: Tim O'Donnell <timodonnell@gmail.com>
Date: Mon, 13 Nov 2017 13:46:39 -0500
Subject: [PATCH] Bump version, upgrade to Keras 2.0.9

* Switch from JSON to YAML for hyperparameters
* Pin tensorflow (hoping will help with #110)
---
 mhcflurry/__init__.py                                      | 2 +-
 .../train_allele_specific_models_command.py                | 6 +++---
 requirements.txt                                           | 7 ++++---
 setup.py                                                   | 5 +++--
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/mhcflurry/__init__.py b/mhcflurry/__init__.py
index ab21634e..cf13e1e6 100644
--- a/mhcflurry/__init__.py
+++ b/mhcflurry/__init__.py
@@ -17,7 +17,7 @@ from .class1_affinity_prediction.class1_neural_network import (
 from .class1_affinity_prediction.class1_affinity_predictor import (
     Class1AffinityPredictor)
 
-__version__ = "0.9.2"
+__version__ = "0.9.3"
 
 __all__ = [
     "Class1NeuralNetwork",
diff --git a/mhcflurry/class1_affinity_prediction/train_allele_specific_models_command.py b/mhcflurry/class1_affinity_prediction/train_allele_specific_models_command.py
index 6f0aa975..1128ca99 100644
--- a/mhcflurry/class1_affinity_prediction/train_allele_specific_models_command.py
+++ b/mhcflurry/class1_affinity_prediction/train_allele_specific_models_command.py
@@ -5,7 +5,7 @@ Train Class1 single allele models.
 import os
 import sys
 import argparse
-import json
+import yaml
 
 import pandas
 
@@ -31,7 +31,7 @@ parser.add_argument(
     "--hyperparameters",
     metavar="FILE.json",
     required=True,
-    help="JSON of hyperparameters")
+    help="JSON or YAML of hyperparameters")
 parser.add_argument(
     "--allele",
     default=None,
@@ -61,7 +61,7 @@ def run(argv=sys.argv[1:]):
 
     configure_logging(verbose=args.verbosity > 1)
 
-    hyperparameters_lst = json.load(open(args.hyperparameters))
+    hyperparameters_lst = yaml.load(open(args.hyperparameters))
     assert isinstance(hyperparameters_lst, list)
     print("Loaded hyperparameters list: %s" % str(hyperparameters_lst))
 
diff --git a/requirements.txt b/requirements.txt
index 51a6f3a0..67444843 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,9 +1,10 @@
 six
-numpy>= 1.11
+numpy>=1.11
 pandas>=0.13.1
-Keras==2.0.8
+Keras==2.0.9
+tensorflow>=1.4.0
 appdirs
-tensorflow
 scikit-learn
 typechecks
 mhcnames
+pyyaml
diff --git a/setup.py b/setup.py
index ae7b0a20..5eeec1c5 100644
--- a/setup.py
+++ b/setup.py
@@ -51,12 +51,13 @@ if __name__ == '__main__':
         'six',
         'numpy>=1.11',
         'pandas>=0.13.1',
-        'Keras==2.0.8',
+        'Keras==2.0.9',
         'appdirs',
-        'tensorflow',
+        'tensorflow>=1.4.0',
         'scikit-learn',
         'typechecks',
         'mhcnames',
+        'pyyaml',
     ]
     if PY2:
         # concurrent.futures is a standard library in Py3 but Py2
-- 
GitLab