class_docstr: Task for classification.
  
  Attributes:
      model:
          1. Model name
          2. Model name on Backprop's text-classification endpoint
          3. Model object that implements the text-classification task
      local (optional): Run locally. Defaults to False
      api_key (optional): Backprop API key for non-local inference
      device (optional): Device to run inference on. Defaults to "cuda" if available.
class_docstr_tok: ["Task","for","classification",".","Attributes",":","model",":","1",".","Model","name","2",".","Model","name","on","Backprop","'s","text-classification","endpoint","3",".","Model","object","that","implements","the","text-classification","task","local","(","optional",")",":","Run","locally",".","Defaults","to","False","api_key","(","optional",")",":","Backprop","API","key","for","non-local","inference","device","(","optional",")",":","Device","to","run","inference","on",".","Defaults","to","``","cuda","''","if","available","."]
docstr: Returns default optimizer for text classification (AdamW, learning rate 2e-5)
docstr_tok: ["Returns","default","optimizer","for","text","classification","(","AdamW",",","learning","rate","2e-5",")"]
code: def configure_optimizers(self):
      """
      Returns default optimizer for text classification (AdamW, learning rate 2e-5)
      """
      return AdamW(params=self.model.parameters(), lr=2e-5)
  
file_path: backprop/backprop/tasks/text_classification.py
imports: from typing import List, Tuple, Union, Optional
  from backprop.models import BaseModel, AutoModel
  from .base import Task
  import torch
  from transformers.optimization import AdamW
  from backprop.utils.datasets import SingleLabelTextClassificationDataset
  import requests
label_desc: Use image node_id 5 for calling the TextClassification obj's underlying member method code with example usage: obj.configure_optimizers() and returns: AdamW