"""BaseModelParams class definition."""

import abc
from typing import List, Type, TypeVar

from lingvo.jax import base_input
from lingvo.jax import py_utils

InstantiableParams = py_utils.InstantiableParams
_BaseModelParamsT = TypeVar('_BaseModelParamsT', bound='BaseModelParams')
BaseModelParamsT = Type[_BaseModelParamsT]


class BaseModelParams(metaclass=abc.ABCMeta):
  """Encapsulates the parameters for a model."""

  @abc.abstractmethod
  def datasets(self) -> List[base_input.BaseInputParams]:
    """Returns the list of dataset parameters."""

  @abc.abstractmethod
  def task(self) -> InstantiableParams:
    """Returns the task parameters."""

"""BaseModelParams class definition."""

import abc
from typing import List, Type, TypeVar

from lingvo.jax import base_input
from lingvo.jax import py_utils

InstantiableParams = py_utils.InstantiableParams
_BaseModelParamsT = TypeVar('_BaseModelParamsT', bound='BaseModelParams')
BaseModelParamsT = Type[_BaseModelParamsT]


class BaseModelParams(metaclass=abc.ABCMeta):
  """Encapsulates the parameters for a model."""

  # p.is_training on each input param is used to determine whether
  # the dataset is used for training or eval.
  @abc.abstractmethod
  def datasets(self) -> List[base_input.BaseInputParams]:
    """Returns the list of dataset parameters."""

  # Optional. Returns a list of datasets to be decoded.
  def decoder_datasets(self) -> List[base_input.BaseInputParams]:
    """Returns the list of dataset parameters for decoder."""
    return []

  @abc.abstractmethod
  def task(self) -> InstantiableParams:
    """Returns the task parameters."""

Add decoder_datasets() to BaseModelParams to indicate which datasets are to be decoded.
Add decoder_datasets() to BaseModelParams to indicate which datasets are to be decoded.

PiperOrigin-RevId: 413779472

  """BaseModelParams class definition."""
  
  import abc
  from typing import List, Type, TypeVar
  
  from lingvo.jax import base_input
  from lingvo.jax import py_utils
  
  InstantiableParams = py_utils.InstantiableParams
  _BaseModelParamsT = TypeVar('_BaseModelParamsT', bound='BaseModelParams')
  BaseModelParamsT = Type[_BaseModelParamsT]
  
  
  class BaseModelParams(metaclass=abc.ABCMeta):
    """Encapsulates the parameters for a model."""
  
+   # p.is_training on each input param is used to determine whether
+   # the dataset is used for training or eval.
    @abc.abstractmethod
    def datasets(self) -> List[base_input.BaseInputParams]:
      """Returns the list of dataset parameters."""
+ 
+   # Optional. Returns a list of datasets to be decoded.
+   def decoder_datasets(self) -> List[base_input.BaseInputParams]:
+     """Returns the list of dataset parameters for decoder."""
+     return []
  
    @abc.abstractmethod
    def task(self) -> InstantiableParams:
      """Returns the task parameters."""
  
Add decoder_datasets() to BaseModelParams to indicate which datasets are to be decoded.
## Code Before:
"""BaseModelParams class definition."""

import abc
from typing import List, Type, TypeVar

from lingvo.jax import base_input
from lingvo.jax import py_utils

InstantiableParams = py_utils.InstantiableParams
_BaseModelParamsT = TypeVar('_BaseModelParamsT', bound='BaseModelParams')
BaseModelParamsT = Type[_BaseModelParamsT]


class BaseModelParams(metaclass=abc.ABCMeta):
  """Encapsulates the parameters for a model."""

  @abc.abstractmethod
  def datasets(self) -> List[base_input.BaseInputParams]:
    """Returns the list of dataset parameters."""

  @abc.abstractmethod
  def task(self) -> InstantiableParams:
    """Returns the task parameters."""

## Instruction:
Add decoder_datasets() to BaseModelParams to indicate which datasets are to be decoded.
## Code After:
"""BaseModelParams class definition."""

import abc
from typing import List, Type, TypeVar

from lingvo.jax import base_input
from lingvo.jax import py_utils

InstantiableParams = py_utils.InstantiableParams
_BaseModelParamsT = TypeVar('_BaseModelParamsT', bound='BaseModelParams')
BaseModelParamsT = Type[_BaseModelParamsT]


class BaseModelParams(metaclass=abc.ABCMeta):
  """Encapsulates the parameters for a model."""

  # p.is_training on each input param is used to determine whether
  # the dataset is used for training or eval.
  @abc.abstractmethod
  def datasets(self) -> List[base_input.BaseInputParams]:
    """Returns the list of dataset parameters."""

  # Optional. Returns a list of datasets to be decoded.
  def decoder_datasets(self) -> List[base_input.BaseInputParams]:
    """Returns the list of dataset parameters for decoder."""
    return []

  @abc.abstractmethod
  def task(self) -> InstantiableParams:
    """Returns the task parameters."""
