• Davide Caroselli's avatar
    Support custom Dictionary implementations in 'preprocess.py' (#448) · bbb4120b
    Davide Caroselli authored
    Summary:
    The `preprocess.py` script has been refactored in order to:
    
    1. Use the `options` module for command line arguments  parsing. This will give to `preprocess.py` the ability to load custom modules with `--user-dir` flag (already implemented to all other binaries)
    2. Dictionary loading and building code has moved to Task implementation. This allows custom Dictionary classes to be used during the data generation step.
    Pull Request resolved: https://github.com/pytorch/fairseq/pull/448
    
    Differential Revision: D13674819
    
    Pulled By: myleott
    
    fbshipit-source-id: b40648a98ed6c08284577e5ec25876e018d8c822
    bbb4120b
preprocess.py 10.1 KB