Maybe load all the models to be assembled together and save them to the ``self._models`` attribute.
512743
def _load_models(self) -> None:
        """"""
        if self._models is None:
            logging.info('Loading %d models', len(self._model_paths))

            def load_model(model_path: str):
                logging.debug('\tloading %s', model_path)
                if path.isdir(model_path):
                    model_path = path.join(model_path, CXF_CONFIG_FILE)
                config = load_config(model_path)
                config['model']['inputs'] = self._inputs
                config['model']['outputs'] = self._outputs

                return create_model(config, output_dir=None, dataset=self._dataset,
                                    restore_from=path.dirname(model_path))

            self._models = list(map(load_model, self._model_paths))
467142
def _expose_models(cls):
        
        if db._IS_OK_:
            register_models(**{m.__name__: m
                               for m in db.Model.__subclasses__()
                               if not hasattr(models, m.__name__)})
310035
public <T extends Model>  void addModels(List<T> models){
        for (T model : models) {
            add(model);
        }
    }
878097
def load_raw(cls, model_fn, schema, *args, **kwargs):
        
        c = cls(*args, **kwargs)
        c.schema = schema.copy(schema_only=True)
        c._model_data = open(model_fn, 'rb').read()
        return c
18587
def register_model(self, model):
        

        assert isinstance(model, str)
        if model not in self.all_models:
            self.all_models.append(model)
394492
def prepare_models(self):
        
        if self.database_config:
            for model in (self.options.queue_model, self.options.error_model):
                model.database.reset(**self.database_config)
455298
def _load_data(self):
        
        filenames = []
        model_identifiers = defaultdict(list)

        # attempt to load fixture files from given directories (first pass)
        # for each valid model fixture file, read it into the cache and get the
        # list of identifier keys from it
        for fixtures_dir in self.fixture_dirs:
            for filename in os.listdir(fixtures_dir):
                path = os.path.join(fixtures_dir, filename)
                file_ext = filename[filename.find('.')+1:]

                # make sure it's a valid fixture file
                if os.path.isfile(path) and file_ext in {'yml', 'yaml'}:
                    filenames.append(filename)
                    with open(path) as f:
                        self._cache[filename] = f.read()

                    # preload to determine identifier keys
                    with self._preloading_env() as env:
                        rendered_yaml = env.get_template(filename).render()
                        data = yaml.load(rendered_yaml)
                        if data:
                            class_name = filename[:filename.rfind('.')]
                            model_identifiers[class_name] = list(data.keys())

        # second pass where we can render the jinja templates with knowledge of all
        # the model identifier keys (allows random_model and random_models to work)
        for filename in filenames:
            self._load_from_yaml(filename, model_identifiers)

        self._loaded = True
995210
def require_models
      model_dir = File.join(File.dirname(__FILE__), %w{ model })
      unless Dir.exist? model_dir
        raise "model directory '#{model_dir}' not exists"
      end
      Dir[File.join(model_dir, '*.rb')].each do |f|
        # puts f
        require f
      end
    end
297921
def relieve_all_models(self):
        
        map(self.relieve_model, list(self.__registered_models))
        self.__registered_models.clear()
266350
def init_all_objects(self, data, target=None, single_result=True):
        
        if single_result:
            return self.init_target_object(target, data)
        return list(self.expand_models(target, data))
499206
function loadModels() {
  const modelSpecsPath = path.join(process.cwd(), plugin.config.modelsPath);

  return plugin.myrmex.fire('beforeModelsLoad')
  .spread(() => {
    return Promise.promisify(fs.readdir)(modelSpecsPath);
  })
  .then(fileNames => {
    // Load all the model specifications
    return Promise.map(fileNames, fileName => {
      const modelSpecPath = path.join(modelSpecsPath, fileName);
      const modelName = path.parse(fileName).name;
      return loadModel(modelSpecPath, modelName);
    });
  })
  .then(models => {
    return plugin.myrmex.fire('afterModelsLoad', models);
  })
  .spread(models => {
    return Promise.resolve(models);
  })
  .catch(e => {
    if (e.code === 'ENOENT' && path.basename(e.path) === path.basename(plugin.config.modelsPath)) {
      return Promise.resolve([]);
    }
    Promise.reject(e);
  });
}
785581
def maybe_load_model(savedir, container):
  """"""
  if savedir is None:
    return

  state_path = os.path.join(os.path.join(savedir, 'training_state.pkl.zip'))
  if container is not None:
    logger.log("Attempting to download model from Azure")
    found_model = container.get(savedir, 'training_state.pkl.zip')
  else:
    found_model = os.path.exists(state_path)
  if found_model:
    state = pickle_load(state_path, compression=True)
    model_dir = "model-{}".format(state["num_iters"])
    if container is not None:
      container.get(savedir, model_dir)
    U.load_state(os.path.join(savedir, model_dir, "saved"))
    logger.log("Loaded models checkpoint at {} iterations".format(
        state["num_iters"]))
    return state
531746
def _load_transition_models(self):
        
        self.transitions = []
        for transition in self.state.transitions.values():
            self._add_model(self.transitions, transition, TransitionModel)
354053
def build_model(self):
        """"""
        with tf.variable_scope(
                "model", reuse=None, initializer=self.initializer):
            self._create_placeholders()
            self._create_rnn_cells()
            self._create_initstate_and_embeddings()
            self._create_rnn_architecture()
            self._create_optimizer_node()
492459
def register_models(**kwargs):
    
    [setattr(models, k, v) for k, v in kwargs.items()]
502822
def get_all_models_including_attached_models(model):
    
    if (hasattr(model, "_tx_model_repository")):
        models = list(
            model._tx_model_repository.all_models.filename_to_model.values())
        if model not in models:
            models.append(model)
    else:
        models = [model]
    return models
390102
function init(_models) {
  _.forEach(_models, (model) =>  {
    models[model.modelName] = model;
  });

  generateTypeDefs(models);
  generateNodeDefinitions(models);
}