Skip to content

Error with English to French Backtranslation #339

@alejopaullier96

Description

@alejopaullier96

I have defined a Back Translation model the following way:

model = naw.BackTranslationAug(from_model_name="Helsinki-NLP/opus-mt-en-fr",
                               to_model_name="Helsinki-NLP/opus-mt-fr-en",
                               device="cuda",
                               batch_size=config.BATCH_SIZE,
                               max_length=1024)

I later augment a list of texts using:

augmented_texts = model.augment(list(texts))

From time to time I get this warning which makes the code fail:

/usr/local/src/pytorch/aten/src/ATen/native/cuda/Indexing.cu:649: indexSelectSmallIndex: block: [1,0,0], thread: [0,0,0] Assertion `srcIndex < srcSelectDimSize` failed.

This is the error:

RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1

I do not know if I am defining the BackTranslationAug model correctly. I used Helsinki-NLP models as said in the documentation. Any help regarding this matter is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions