class_docstr:     Base class for supervised learning trainers.
  
  Args:
      strategy (Strategy):the strategy to use for training
      max_epochs (int, defaults to 1): the number of epochs of training process
      model (nn.Module): the model to train
      optim (Optimizer): the optimizer to use for training
class_docstr_tok: ["Base","class","for","supervised","learning","trainers",".","Args",":","strategy","(","Strategy",")",":","the","strategy","to","use","for","training","max_epochs","(","int",",","defaults","to","1",")",":","the","number","of","epochs","of","training","process","model","(","nn.Module",")",":","the","model","to","train","optim","(","Optimizer",")",":","the","optimizer","to","use","for","training"]
code: def fit(self, *args, **kwargs):
      self._before_fit(*args, **kwargs)
      for epoch in tqdm.trange(
          self.max_epochs, desc="Epochs", disable=not is_rank_0()
      ):
          self._train(epoch)
          self._eval(epoch)
  
imports: from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from typing import List
  import torch.nn
  import tqdm
  from coati.experience_buffer import NaiveExperienceBuffer
  from coati.experience_maker import Experience
  from torch.optim import Optimizer
  from .callbacks import Callback
  from .strategies import Strategy
  from .utils import is_rank_0
label_desc: Use image node_id 5 for calling the SLTrainer obj's underlying member method code with example usage: obj.fit() without return types