Beispiel #1
0
 def testConstruct(self):
     examples = standard_artifacts.Examples()
     model = standard_artifacts.Model()
     model_validator = component.ModelValidator(
         examples=channel_utils.as_channel([examples]),
         model=channel_utils.as_channel([model]))
     self.assertEqual(standard_artifacts.ModelBlessing.TYPE_NAME,
                      model_validator.outputs['blessing'].type_name)
Beispiel #2
0
 def test_construct(self):
     examples = types.TfxArtifact(type_name='ExamplesPath')
     model = types.TfxArtifact(type_name='ModelExportPath')
     model_validator = component.ModelValidator(
         examples=channel.as_channel([examples]),
         model=channel.as_channel([model]))
     self.assertEqual('ModelBlessingPath',
                      model_validator.outputs.blessing.type_name)
Beispiel #3
0
 def test_construct(self):
     examples = standard_artifacts.Examples()
     model = standard_artifacts.Model()
     model_validator = component.ModelValidator(
         examples=channel_utils.as_channel([examples]),
         model=channel_utils.as_channel([model]))
     self.assertEqual('ModelBlessingPath',
                      model_validator.outputs.blessing.type_name)
    def __init__(self, examples: str, model: str):
        component = model_validator_component.ModelValidator(
            channel.Channel('ExamplesPath'),
            channel.Channel('ModelExportPath'))

        super().__init__(component, {
            "examples": examples,
            "model": model,
        })