class_docstr: Command line interface training args.
  
  This requires more arguments to create models and get datasets.
  Args:
      model_name_or_path (str): Name or path of the model we want to create. "lstm" and "cnn" will create TextAttack's LSTM and CNN models while
          any other input will be used to create Transformers model. (e.g."brt-base-uncased").
      attack (str): Attack recipe to use (enables adversarial training)
      dataset (str): dataset for training; will be loaded from `datasets` library.
      task_type (str): Type of task model is supposed to perform. Options: `classification`, `regression`.
      model_max_length (int): The maximum sequence length of the model.
      model_num_labels (int): The number of labels for classification (1 for regression).
      dataset_train_split (str): Name of the train split. If not provided will try `train` as the split name.
      dataset_eval_split (str): Name of the train split. If not provided will try `dev`, `validation`, or `eval` as split name.
class_docstr_tok: ["Command","line","interface","training","args",".","This","requires","more","arguments","to","create","models","and","get","datasets",".","Args",":","model_name_or_path","(","str",")",":","Name","or","path","of","the","model","we","want","to","create",".","``","lstm","''","and","``","cnn","''","will","create","TextAttack","'s","LSTM","and","CNN","models","while","any","other","input","will","be","used","to","create","Transformers","model",".","(","e.g.","''","brt-base-uncased","''",")",".","attack","(","str",")",":","Attack","recipe","to","use","(","enables","adversarial","training",")","dataset","(","str",")",":","dataset","for","training",";","will","be","loaded","from","`","datasets","`","library",".","task_type","(","str",")",":","Type","of","task","model","is","supposed","to","perform",".","Options",":","`","classification","`",",","`","regression","`",".","model_max_length","(","int",")",":","The","maximum","sequence","length","of","the","model",".","model_num_labels","(","int",")",":","The","number","of","labels","for","classification","(","1","for","regression",")",".","dataset_train_split","(","str",")",":","Name","of","the","train","split",".","If","not","provided","will","try","`","train","`","as","the","split","name",".","dataset_eval_split","(","str",")",":","Name","of","the","train","split",".","If","not","provided","will","try","`","dev","`",",","`","validation","`",",","or","`","eval","`","as","split","name","."]
code: def _create_dataset_from_args(cls, args):
      dataset_args = args.dataset.split(ARGS_SPLIT_TOKEN)
      # TODO `HuggingFaceDataset` -> `HuggingFaceDataset`
      if args.dataset_train_split:
          train_dataset = HuggingFaceDataset(
              *dataset_args, split=args.dataset_train_split
          )
      else:
          try:
              train_dataset = HuggingFaceDataset(
                  *dataset_args, split="train"
              )
              args.dataset_train_split = "train"
          except KeyError:
              raise KeyError(
                  f"Error: no `train` split found in `{args.dataset}` dataset"
              )
  
      if args.dataset_eval_split:
          eval_dataset = HuggingFaceDataset(
              *dataset_args, split=args.dataset_eval_split
          )
      else:
          # try common dev split names
          try:
              eval_dataset = HuggingFaceDataset(
                  *dataset_args, split="dev"
              )
              args.dataset_eval_split = "dev"
          except KeyError:
              try:
                  eval_dataset = HuggingFaceDataset(
                      *dataset_args, split="eval"
                  )
                  args.dataset_eval_split = "eval"
              except KeyError:
                  try:
                      eval_dataset = HuggingFaceDataset(
                          *dataset_args, split="validation"
                      )
                      args.dataset_eval_split = "validation"
                  except KeyError:
                      try:
                          eval_dataset = HuggingFaceDataset(
                              *dataset_args, split="test"
                          )
                          args.dataset_eval_split = "test"
                      except KeyError:
                          raise KeyError(
                              f"Could not find `dev`, `eval`, `validation`, or `test` split in dataset {args.dataset}."
                          )
  
      if args.filter_train_by_labels:
          train_dataset.filter_by_labels_(args.filter_train_by_labels)
      if args.filter_eval_by_labels:
          eval_dataset.filter_by_labels_(args.filter_eval_by_labels)
      # Testing for Coverage of model return values with dataset.
      num_labels = args.model_num_labels if args.model_num_labels else 2
  
      # Only Perform labels checks if output_column is equal to label.
      if (
          train_dataset.output_column == "label"
          and eval_dataset.output_column == "label"
      ):
          train_dataset_labels = train_dataset._dataset["label"]
  
          eval_dataset_labels = eval_dataset._dataset["label"]
  
          train_dataset_labels_set = set(train_dataset_labels)
  
          assert all(
              label >= 0
              for label in train_dataset_labels_set
              if isinstance(label, int)
          ), f"Train dataset has negative label/s {[label for label in train_dataset_labels_set if isinstance(label,int) and label < 0 ]} which is/are not supported by pytorch.Use --filter-train-by-labels to keep suitable labels"
  
          assert num_labels >= len(
              train_dataset_labels_set
          ), f"Model constructed has {num_labels} output nodes and train dataset has {len(train_dataset_labels_set)} labels , Model should have output nodes greater than or equal to labels in train dataset.Use --model-num-labels to set model's output nodes."
  
          eval_dataset_labels_set = set(eval_dataset_labels)
  
          assert all(
              label >= 0
              for label in eval_dataset_labels_set
              if isinstance(label, int)
          ), f"Eval dataset has negative label/s {[label for label in eval_dataset_labels_set if isinstance(label,int) and label < 0 ]} which is/are not supported by pytorch.Use --filter-eval-by-labels to keep suitable labels"
  
          assert num_labels >= len(
              set(eval_dataset_labels_set)
          ), f"Model constructed has {num_labels} output nodes and eval dataset has {len(eval_dataset_labels_set)} labels , Model should have output nodes greater than or equal to labels in eval dataset.Use --model-num-labels to set model's output nodes."
  
      return train_dataset, eval_dataset
  
imports: from dataclasses import dataclass, field
  import datetime
  import os
  from typing import Union
  from textattack.datasets import HuggingFaceDataset
  from textattack.models.helpers import LSTMForClassification, WordCNNForClassification
  from textattack.models.wrappers import HuggingFaceModelWrapper, ModelWrapper, PyTorchModelWrapper
  from textattack.shared import logger
  from textattack.shared.utils import ARGS_SPLIT_TOKEN
  from .attack import Attack
  from .attack_args import ATTACK_RECIPE_NAMES
label_desc: Use image node_id 3 for calling the _CommandLineTrainingArgs obj's underlying member method code with example usage: obj._create_dataset_from_args(cls, args) and returns: train_dataset,  eval_dataset