class_docstr: Transformers base model (for working with pytorch-transformers models)
class_docstr_tok: ["Transformers","base","model","(","for","working","with","pytorch-transformers","models",")"]
docstr: get train steps and epochs
  
  Args:
      max_steps (int): max steps
      num_train_epochs (int): num epochs
      gradient_accumulation_steps (int): gradient accumulation steps
      num_samples (int): number of samples
  
  Returns:
      Tuple: total steps, number of epochs
docstr_tok: ["get","train","steps","and","epochs","Args",":","max_steps","(","int",")",":","max","steps","num_train_epochs","(","int",")",":","num","epochs","gradient_accumulation_steps","(","int",")",":","gradient","accumulation","steps","num_samples","(","int",")",":","number","of","samples","Returns",":","Tuple",":","total","steps",",","number","of","epochs"]
code: def get_train_steps_epochs(
      max_steps: int,
      num_train_epochs: int,
      gradient_accumulation_steps: int,
      num_samples: int,
  ):
      """
      get train steps and epochs
  
      Args:
          max_steps (int): max steps
          num_train_epochs (int): num epochs
          gradient_accumulation_steps (int): gradient accumulation steps
          num_samples (int): number of samples
  
      Returns:
          Tuple: total steps, number of epochs
      """
      if max_steps > 0:
          t_total = max_steps
          num_train_epochs = (
              max_steps // (num_samples // gradient_accumulation_steps)
              + 1
          )
      else:
          t_total = (
              num_samples
              // gradient_accumulation_steps
              * num_train_epochs
          )
      return t_total, num_train_epochs
  
imports: import io
  import logging
  import os
  from typing import List, Union
  import torch
  from torch.utils.data import DataLoader
  from tqdm import tqdm, trange
  from transformers import AdamW, BertConfig, BertTokenizer, RobertaConfig, RobertaTokenizer, XLMConfig, XLMTokenizer, XLNetConfig, XLNetTokenizer, get_linear_schedule_with_warmup
  from nlp_architect.models import TrainableModel
  from nlp_architect.models.transformers.quantized_bert import QuantizedBertConfig
label_desc: Use image node_id 12 for calling the TransformerBase obj's underlying member method code with example usage: obj.get_train_steps_epochs(max_steps, num_train_epochs, gradient_accumulation_steps, num_samples) and returns: t_total,  num_train_epochs