nemo_curator.stages.text.experimental.translation.backends.aws
nemo_curator.stages.text.experimental.translation.backends.aws
AWS Translate backend for NeMo Curator.
Uses Amazon Translate for translation. The sync boto3 client is wrapped in
asyncio.get_running_loop().run_in_executor() for async support.
Module Contents
Classes
Data
API
Bases: ExecutorTranslationBackend
AWS Translate backend.
Parameters:
region
AWS region. Resolved in order: explicit value ->
AWS_REGION env var -> AWS_DEFAULT_REGION env var ->
"us-east-2" fallback.
max_concurrent_requests
Semaphore size for async concurrency.
_region
backend_name
Treat client-side size validation as a hard failure.
Synchronous single-text translation (called via executor).
Raises:
ValueError: If the UTF-8 encoded text exceeds 10 000 bytes.
Release client resources.
Initialize the boto3 Translate client.
Raises:
ImportError: Ifboto3is not installed.