(self, opt, model_id=None, **model_kwargs)
return model_id
Preloading the model: updating internal datastructure
           It will effectively load the model if `load` is set
Preloading the model: updating internal datastructure
           It will effectively load the model if `load` is set
Preloading the model : updating internal datastructure It will effectively load the model if load is set
def preload_model(self, opt, model_id=None, **model_kwargs):
        """Preloading the model: updating internal datastructure
           It will effectively load the model if `load` is set
        """
        if model_id is not None:
            if model_id in self.models.keys():
                raise ValueError("Model ID %d already exists" % model_id)
        else:
            model_id = self.next_id
            while model_id in self.models.keys():
                model_id += 1
            self.next_id = model_id + 1
        print("Pre-loading model %d" % model_id)
        model = ServerModel(opt, model_id, **model_kwargs)
        self.models[model_id] = model

        return model_id
def preload_model ( self , opt , model_id = None , * * model_kwargs ) : if model_id is not None : if model_id in self . models . keys ( ) : raise ValueError ( "Model ID %d already exists" % model_id ) else : model_id = self . next_id while model_id in self . models . keys ( ) : model_id += 1 self . next_id = model_id + 1 print ( "Pre-loading model %d" % model_id ) model = ServerModel ( opt , model_id , * * model_kwargs ) self . models [ model_id ] = model return model_id