This repository was archived by the owner on Sep 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,13 @@ class ModelCardGeneratorSpec(component_spec.ComponentSpec):
3434 INPUTS = {
3535 standard_component_specs .STATISTICS_KEY :
3636 component_spec .ChannelParameter (
37- type = standard_artifacts .ExampleStatistics ),
37+ type = standard_artifacts .ExampleStatistics , optional = True ),
3838 standard_component_specs .EVALUATION_KEY :
3939 component_spec .ChannelParameter (
40- type = standard_artifacts .ModelEvaluation ),
40+ type = standard_artifacts .ModelEvaluation , optional = True ),
4141 standard_component_specs .PUSHED_MODEL_KEY :
42- component_spec .ChannelParameter (type = standard_artifacts .PushedModel ),
42+ component_spec .ChannelParameter (
43+ type = standard_artifacts .PushedModel , optional = True ),
4344 }
4445 OUTPUTS = {
4546 MODEL_CARD_KEY :
Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ def test_component_construction(self):
5050 ('path/to/md/template' , 'mc.md' )]
5151 }, this_component .exec_properties )
5252
53+ def test_empty_component_construction (self ):
54+ this_component = ModelCardGenerator ()
55+ with self .subTest ('outputs' ):
56+ self .assertEqual (this_component .outputs ['model_card' ].type_name ,
57+ artifact .ModelCard .TYPE_NAME )
58+
5359
5460if __name__ == '__main__' :
5561 absltest .main ()
You can’t perform that action at this time.
0 commit comments