fix merge conflict

This commit is contained in:
svlandeg 2020-06-15 09:04:19 +02:00
parent a48553c1ed
commit ff231e1cdd

View File

@ -13,11 +13,7 @@ from thinc.api import Model, use_pytorch_for_gpu_memory
import random import random
from ..gold import GoldCorpus from ..gold import GoldCorpus
<<<<<<< HEAD
from ..gold import Example
=======
from ..lookups import Lookups from ..lookups import Lookups
>>>>>>> origin/develop
from .. import util from .. import util
from ..errors import Errors from ..errors import Errors
from ..ml import models # don't remove - required to load the built-in architectures from ..ml import models # don't remove - required to load the built-in architectures
@ -374,27 +370,17 @@ def train(
def create_train_batches(nlp, corpus, cfg): def create_train_batches(nlp, corpus, cfg):
epochs_todo = cfg.get("max_epochs", 0) epochs_todo = cfg.get("max_epochs", 0)
while True: while True:
<<<<<<< HEAD
train_examples = list(corpus.train_dataset(
nlp,
noise_level=0.0,
orth_variant_level=cfg["orth_variant_level"],
gold_preproc=cfg["gold_preproc"],
max_length=cfg["max_length"],
ignore_misaligned=True
))
=======
train_examples = list( train_examples = list(
corpus.train_dataset( corpus.train_dataset(
nlp, nlp,
noise_level=0.0, # I think this is deprecated? noise_level=cfg["noise_level"], # I think this is deprecated?
orth_variant_level=cfg["orth_variant_level"], orth_variant_level=cfg["orth_variant_level"],
gold_preproc=cfg["gold_preproc"], gold_preproc=cfg["gold_preproc"],
max_length=cfg["max_length"], max_length=cfg["max_length"],
ignore_misaligned=True, ignore_misaligned=True,
) )
) )
>>>>>>> origin/develop
if len(train_examples) == 0: if len(train_examples) == 0:
raise ValueError(Errors.E988) raise ValueError(Errors.E988)
random.shuffle(train_examples) random.shuffle(train_examples)