class_docstr: Basic wrapper of generated model.
  Lightning modules used in NNI should inherit this class.
  
  It's a subclass of ``pytorch_lightning.LightningModule``.
  See https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html
  
  See :class:`SupervisedLearningModule` as an example.
class_docstr_tok: ["Basic","wrapper","of","generated","model",".","Lightning","modules","used","in","NNI","should","inherit","this","class",".","It","'s","a","subclass","of","``","pytorch_lightning.LightningModule","``",".","See","https",":","\/\/pytorch-lightning.readthedocs.io\/en\/stable\/common\/lightning_module.html","See",":","class",":","`","SupervisedLearningModule","`","as","an","example","."]
docstr: Set the inner model (architecture) to train / evaluate.
  
  As there is no explicit method to "unset" a model,
  the model is left in the lightning module after the method is called.
  We don't recommend relying on this behavior.
code: def set_model(self, model: nn.Module) -> None:
      """Set the inner model (architecture) to train / evaluate.
  
      As there is no explicit method to "unset" a model,
      the model is left in the lightning module after the method is called.
      We don't recommend relying on this behavior.
      """
      if not isinstance(model, nn.Module):
          raise TypeError("model must be an instance of nn.Module")
      self._model = model
  
imports: import logging
  import os
  import warnings
  from pathlib import Path
  from typing import Any, Dict, Union, Optional, List, Type
  import pytorch_lightning
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import torchmetrics
  import torchmetrics.classification
  import torch.utils.data
  import nni
  from nni.common.serializer import is_traceable
  from nni.nas.evaluator import MutableEvaluator
label_desc: Use image node_id 2 for calling the LightningModule obj's underlying member method code with example usage: obj.set_model(model) without return types