Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix training tests
  • Loading branch information
kristapratico committed Sep 30, 2020
commit 380be3c41ec7b314717e07043b178692f8f6325b
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_training_transform(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand All @@ -127,7 +127,7 @@ def test_training_multipage_transform(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand Down Expand Up @@ -194,7 +194,7 @@ def test_training_with_labels_transform(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand All @@ -213,7 +213,7 @@ def test_train_multipage_w_labels_transform(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async def test_training_transform(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand All @@ -138,7 +138,7 @@ async def test_training_multipage_transform(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand Down Expand Up @@ -205,7 +205,7 @@ async def test_training_with_labels_transform(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand All @@ -225,7 +225,7 @@ async def test_train_multipage_w_lbls_trnsfrm(self, client, container_sas_url):

def callback(response, _, headers):
raw_model = client._deserialize(Model, response)
custom_model = CustomFormModel._from_generated(raw_model)
custom_model = CustomFormModel._from_generated(raw_model, client.api_version)
raw_response.append(raw_model)
raw_response.append(custom_model)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def assertModelTransformCorrect(self, model, actual, unlabeled=False):
for a in actual.train_result.fields:
self.assertEqual(model.submodels[0].fields[a.field_name].name, a.field_name)
self.assertEqual(model.submodels[0].fields[a.field_name].accuracy, a.accuracy)
self.assertEqual(model.submodels[0].form_type, "form-"+model.model_id)
self.assertEqual(model.submodels[0].form_type, "custom:"+model.model_id)
self.assertEqual(model.submodels[0].accuracy, actual.train_result.average_model_accuracy)

def assertFormPagesTransformCorrect(self, pages, actual_read, page_result=None, **kwargs):
Expand Down