Unbabel / OpenKiwi

Open-Source Machine Translation Quality Estimation in PyTorch
https://unbabel.github.io/OpenKiwi/
GNU Affero General Public License v3.0
228 stars 48 forks source link

Fix train from file #76

Closed captainvera closed 4 years ago

captainvera commented 4 years ago

The function kiwi.lib.train.train_from_file was not working as expected for two different reasons:

  1. It expected a Path object, so calling it as:

    from kiwi.lib.train import train_from_file
    run_info = train_from_file('config/bert.yaml')

    Did not work.

  2. We were loading the config file directly and not passing it through hydra, this made it so that defaults weren't being processed.

This PR fixes both issues.

Shannen3206 commented 4 years ago

The problem has been solved, thank you very much for your help, your rigorous academic attitude is worth learning.

captainvera commented 4 years ago

@kepler this has been reviewed. Tests and Docstrings added.