class_docstr: Simple implementation of the starspace algorithm: https://arxiv.org/abs/1709.03856.
docstr: Reset observation and episode_done.
docstr_tok: ["Reset","observation","and","episode_done","."]
code: def reset(self):
      """
      Reset observation and episode_done.
      """
      self.observation = None
      self.episode_done = True
      # set up optimizer
      lr = self.opt["learningrate"]
      optim_class = StarspaceAgent.OPTIM_OPTS[self.opt["optimizer"]]
      kwargs = {"lr": lr}
      self.optimizer = optim_class(self.model.parameters(), **kwargs)
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.agents import Agent
  from parlai.core.dict import DictionaryAgent
  from parlai.utils.misc import maintain_dialog_history, load_cands
  from parlai.core.torch_agent import TorchAgent
  from parlai.utils.io import PathManager
  import parlai.utils.torch
  import parlai.utils.logging
  from .modules import Starspace
  import torch
  from torch import optim
  import torch.nn
  from collections import deque
  import copy
  import random
  import json
label_desc: Use image node_id 5 for calling the StarspaceAgent obj's underlying member method code with example usage: obj.reset() without return types