Beispiel #1
0
    def test_delete_model(self):
        num_models = len(mr.list_models())
        model = mr.get_model(self.model_name)
        mr.delete_model(model)

        model = mr.get_model(model.id)
        assert model is None

        all_models = mr.list_models()
        assert len(all_models) == num_models - 1
Beispiel #2
0
    def test_delete_model(self):
        model_count = len(mr.list_models())
        model1 = mr.get_model(self.model_name)
        assert isinstance(model1, RestObj)

        model2 = mr.get_model(model1.id)
        assert model1.id == model2.id

        mr.delete_model(model1)

        model3 = mr.get_model(model1.id)
        assert model3 is None

        all_models = mr.list_models()
        assert len(all_models) == model_count - 1
outputs.loc[len(outputs)] = [1, 0.5, 0.5]
path = Path.cwd()

####
#### Creating input & output files
JSONFiles = pzmm.JSONFiles()

### write inputVar.json
JSONFiles.writeVarJSON(inputs, isInput=True, jPath=path)

### write outputVar.json
JSONFiles.writeVarJSON(outputs, isInput=False, jPath=path)

### Creating
### don't use this in the real world
model_repository.delete_model(modelname)
#model_exists = model_repository.get_model(modelname, refresh=False)

# #model_repository.delete_model(modelname)
# if model_exists == None:
#     print('Creating new model')
model_repository.create_model(model=modelname,
                              project=project_name,
                              description='My Jenkings automatized',
                              modeler='Hellas',
                              algorithm=algo,
                              tool='R',
                              score_code_type='R',
                              function='Classification',
                              is_champion=False,
                              is_challenger=True,