class_docstr: Model space that keeps the original model and does no conversion of model format
  (in contrast to :class:`SimplifiedModelSpace` or :class:`~nni.nas.space.GraphModelSpace`).
  
  It's possible that strategies directly operate on this format of model space,
  but it will be very slow (since dealing with deep learning models directly) and inflexible.
  
  Therefore, this is almost only useful when strategies need to fuse the model space and evaluator,
  which requires source-code-level access to those two components.
  One typical use case is one-shot strategy.
  
  In the current version, :class:`RawFormatModelSpace` can't be serialized and sent to remote machines.
  
  Examples
  --------
  A simple example of using :class:`RawFormatModelSpace` is as follows::
  
      from nni.nas.nn.pytorch import ModelSpace
      class MyModelSpace(ModelSpace):
          ...
  
      evaluator = FunctionEvaluator(evaluate_fn, learning_rate=nni.choice('lr', [0.1, 1.0]))
      model_space = RawFormatModelSpace(MyModelSpace(), evaluator)
  
  The space can then be simplified and freezed::
  
      frozen_model = model_space.freeze({'layer1': 0, 'lr': 0.1})
  
  The frozen model can be instantiated and executed::
  
      model = frozen_model.executable_model()
      evaluator.evaluate(model)
class_docstr_tok: ["Model","space","that","keeps","the","original","model","and","does","no","conversion","of","model","format","(","in","contrast","to",":","class",":","`","SimplifiedModelSpace","`","or",":","class",":","`","~nni.nas.space.GraphModelSpace","`",")",".","It","'s","possible","that","strategies","directly","operate","on","this","format","of","model","space",",","but","it","will","be","very","slow","(","since","dealing","with","deep","learning","models","directly",")","and","inflexible",".","Therefore",",","this","is","almost","only","useful","when","strategies","need","to","fuse","the","model","space","and","evaluator",",","which","requires","source-code-level","access","to","those","two","components",".","One","typical","use","case","is","one-shot","strategy",".","In","the","current","version",",",":","class",":","`","RawFormatModelSpace","`","ca","n't","be","serialized","and","sent","to","remote","machines",".","Examples","--","--","--","--","A","simple","example","of","using",":","class",":","`","RawFormatModelSpace","`","is","as","follows",":",":","from","nni.nas.nn.pytorch","import","ModelSpace","class","MyModelSpace","(","ModelSpace",")",":","...","evaluator","=","FunctionEvaluator","(","evaluate_fn",",","learning_rate=nni.choice","(","'lr","'",",","[","0.1",",","1.0","]",")",")","model_space","=","RawFormatModelSpace","(","MyModelSpace","(",")",",","evaluator",")","The","space","can","then","be","simplified","and","freezed",":",":","frozen_model","=","model_space.freeze","(","{","'layer1","'",":","0",",","'lr","'",":","0.1","}",")","The","frozen","model","can","be","instantiated","and","executed",":",":","model","=","frozen_model.executable_model","(",")","evaluator.evaluate","(","model",")"]
code: def _load(cls, **kwargs) -> NoReturn:
      raise NotImplementedError(
          "`_load` is not implemented for {}".format(
              RawFormatModelSpace.__name__
          )
      )
  
imports: from __future__ import annotations
  import weakref
  from copy import deepcopy
  from enum import Enum
  from typing import NoReturn, Any, Callable, Iterable
  from nni.common.serializer import is_traceable, SerializableObject
  from nni.nas.evaluator import Evaluator
  from nni.mutable import Mutable, Sample, MutableDict, LabeledMutable, SampleValidationError, frozen_factory
  from nni.typehint import TrialMetric
  from .frozen import model_context
  from .metrics import Metrics
label_desc: Use image node_id 10 for calling the RawFormatModelSpace obj's underlying member method code with example usage: obj._load(cls) without return types