Class TextDataset.Builder<T extends TextDataset.Builder<T>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String artifactId  
      protected java.lang.String groupId  
      protected ai.djl.repository.Repository repository  
      protected ai.djl.training.dataset.Dataset.Usage usage  
      • Fields inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder

        dataBatchifier, device, labelBatchifier, limit, pipeline, prefetchNumber, sampler, targetPipeline
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T optArtifactId​(java.lang.String artifactId)
      Sets the optional artifactId.
      T optGroupId​(java.lang.String groupId)
      Sets optional groupId.
      T optManager​(ai.djl.ndarray.NDManager manager)
      Sets the optional manager for the dataset (default follows engine default).
      T optRepository​(ai.djl.repository.Repository repository)
      Sets the optional repository.
      T optUsage​(ai.djl.training.dataset.Dataset.Usage usage)
      Sets the optional usage.
      T setSourceConfiguration​(TextData.Configuration sourceConfiguration)
      Sets the TextData.Configuration to use for the source text data.
      T setTargetConfiguration​(TextData.Configuration targetConfiguration)
      Sets the TextData.Configuration to use for the target text data.
      • Methods inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder

        addTargetTransform, addTransform, getSampler, optDataBatchifier, optDevice, optLabelBatchifier, optLimit, optPipeline, optPrefetchNumber, optTargetPipeline, self, setSampling, setSampling, setSampling
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • repository

        protected ai.djl.repository.Repository repository
      • groupId

        protected java.lang.String groupId
      • artifactId

        protected java.lang.String artifactId
      • usage

        protected ai.djl.training.dataset.Dataset.Usage usage
    • Method Detail

      • optManager

        public T optManager​(ai.djl.ndarray.NDManager manager)
        Sets the optional manager for the dataset (default follows engine default).
        Parameters:
        manager - the manager
        Returns:
        this builder
      • optUsage

        public T optUsage​(ai.djl.training.dataset.Dataset.Usage usage)
        Sets the optional usage.
        Parameters:
        usage - the usage
        Returns:
        this builder
      • optRepository

        public T optRepository​(ai.djl.repository.Repository repository)
        Sets the optional repository.
        Parameters:
        repository - the repository
        Returns:
        this builder
      • optGroupId

        public T optGroupId​(java.lang.String groupId)
        Sets optional groupId.
        Parameters:
        groupId - the groupId}
        Returns:
        this builder
      • optArtifactId

        public T optArtifactId​(java.lang.String artifactId)
        Sets the optional artifactId.
        Parameters:
        artifactId - the artifactId
        Returns:
        this builder