@classmethod
def validate_preprocess_args(cls, opt):
    assert (opt.max_shard_size == 0), '-max_shard_size is deprecated. Please use             -shard_size (number of examples) instead.'
    assert (opt.shuffle == 0), '-shuffle is not implemented. Please shuffle             your data before pre-processing.'
    assert (len(opt.train_src) == len(opt.train_tgt)), 'Please provide same number of src and tgt train files!'
    assert (len(opt.train_src) == len(opt.train_ids)), 'Please provide proper -train_ids for your data!'
    for file in (opt.train_src + opt.train_tgt):
        assert os.path.isfile(file), ('Please check path of %s' % file)
    assert ((not opt.valid_src) or os.path.isfile(opt.valid_src)), 'Please check path of your valid src file!'
    assert ((not opt.valid_tgt) or os.path.isfile(opt.valid_tgt)), 'Please check path of your valid tgt file!'
    assert ((not opt.src_vocab) or os.path.isfile(opt.src_vocab)), 'Please check path of your src vocab!'
    assert ((not opt.tgt_vocab) or os.path.isfile(opt.tgt_vocab)), 'Please check path of your tgt vocab!'
@classmethod
def validate_preprocess_args(cls, opt):
    assert (opt.max_shard_size == 0), '-max_shard_size is deprecated. Please use             -shard_size (number of examples) instead.'
    assert (opt.shuffle == 0), '-shuffle is not implemented. Please shuffle             your data before pre-processing.'
    assert (len(opt.train_src) == len(opt.train_tgt)), 'Please provide same number of src and tgt train files!'
    assert (len(opt.train_src) == len(opt.train_ids)), 'Please provide proper -train_ids for your data!'
    for file in (opt.train_src + opt.train_tgt):
        assert os.path.isfile(file), ('Please check path of %s' % file)
    assert ((not opt.valid_src) or os.path.isfile(opt.valid_src)), 'Please check path of your valid src file!'
    assert ((not opt.valid_tgt) or os.path.isfile(opt.valid_tgt)), 'Please check path of your valid tgt file!'
    assert ((not opt.src_vocab) or os.path.isfile(opt.src_vocab)), 'Please check path of your src vocab!'
    assert ((not opt.tgt_vocab) or os.path.isfile(opt.tgt_vocab)), 'Please check path of your tgt vocab!'