Repository: deeppavlov/DeepPavlov

Issue:
Downloading requirements
I was trying to install deeppavlov and had a problem following the installation steps.

1) There is no download.py file in root folder, it is in `deeppavlov/download.py`
``` sh
python download.py [-all] 
```

2) Even if I use that file it outputs the error:
``` sh
(env) root@mysexyhost:~/work/ipavlov/DeepPavlov# python3 deeppavlov/download.py
/home/ubuntu/work/ipavlov/env/local/lib/python3.5/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
2018-03-12 07:34:11.490 ERROR in 'deeppavlov.core.models.serializable'['log'] at line 54: LOGGER ERROR: Can not initialise deeppavlov.core.models.serializable logger, logging to the stderr. Error traceback:
Traceback (most recent call last):
  File "/home/ubuntu/work/ipavlov/DeepPavlov/deeppavlov/core/common/log.py", line 32, in get_logger
    with open(log_config_path) as log_config_json:
TypeError: invalid file: PosixPath('/home/ubuntu/work/ipavlov/DeepPavlov/deeppavlov/log_config.json')
2018-03-12 07:34:11.491 ERROR in 'deeppavlov.core.models.keras_model'['log'] at line 54: LOGGER ERROR: Can not initialise deeppavlov.core.models.keras_model logger, logging to the stderr. Error traceback:
Traceback (most recent call last):
  File "/home/ubuntu/work/ipavlov/DeepPavlov/deeppavlov/core/common/log.py", line 32, in get_logger
    with open(log_config_path) as log_config_json:
TypeError: invalid file: PosixPath('/home/ubuntu/work/ipavlov/DeepPavlov/deeppavlov/log_config.json')
Traceback (most recent call last):
  File "deeppavlov/download.py", line 24, in <module>
    from deeppavlov.core.data.utils import download, download_decompress
  File "/home/ubuntu/work/ipavlov/DeepPavlov/deeppavlov/__init__.py", line 1, in <module>
    import deeppavlov.core.models.keras_model
  File "/home/ubuntu/work/ipavlov/DeepPavlov/deeppavlov/core/models/keras_model.py", line 39, in <module>
    class KerasModel(NNModel, metaclass=TfModelMeta):
  File "/home/ubuntu/work/ipavlov/DeepPavlov/deeppavlov/core/models/keras_model.py", line 143, in KerasModel
    sample_weight_mode=None, weighted_metrics=None, target_tensors=None):
  File "/home/ubuntu/work/ipavlov/env/local/lib/python3.5/site-packages/overrides/overrides.py", line 70, in overrides
    method.__name__)
AssertionError: No super class method found for "load"
```


Discussion:

Resolving patch:
diff --git a/telegram_utils/telegram_ui.py b/telegram_utils/telegram_ui.py
--- a/telegram_utils/telegram_ui.py
+++ b/telegram_utils/telegram_ui.py
@@ -13,6 +13,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 """
+from pathlib import Path
+
 import telebot
 
 from deeppavlov.core.common.file import read_json
@@ -23,7 +25,8 @@ def init_bot_for_model(token, model):
     bot = telebot.TeleBot(token)
 
     model_name = type(model).__name__
-    models_info = read_json('../telegram_utils/models_info.json')
+    config_path = Path(__file__).parent / 'models_info.json'
+    models_info = read_json(str(config_path))
     model_info = models_info[model_name] if model_name in models_info else models_info['@default']
 
     @bot.message_handler(commands=['start'])


Test patch: