@@ -1040,6 +1040,7 @@ class Model(Serializable):
10401040 requirements: the ModelRequirements for the model (if any)
10411041 tags: a list of tags for the model (if any)
10421042 date_added: the datetime that the model was added (if any)
1043+ training_data: the training data information for the model (if any)
10431044 """
10441045
10451046 # An optional error message to append to any error messages resulting from
@@ -1063,6 +1064,7 @@ def __init__(
10631064 requirements = None ,
10641065 tags = None ,
10651066 date_added = None ,
1067+ training_data = None ,
10661068 ):
10671069 """Creates a Model instance.
10681070
@@ -1084,6 +1086,7 @@ def __init__(
10841086 requirements: (optional) a ModelRequirements for the model
10851087 tags: (optional) a list of tags for the model
10861088 date_added: (optional) the datetime that the model was created
1089+ training_data: (optional) the training data information for the model
10871090 """
10881091 self .base_name = base_name
10891092 self .base_filename = base_filename
@@ -1100,6 +1103,7 @@ def __init__(
11001103 self .requirements = requirements
11011104 self .tags = tags
11021105 self .date_added = date_added
1106+ self .training_data = training_data
11031107
11041108 @property
11051109 def name (self ):
@@ -1429,6 +1433,7 @@ def attributes(self):
14291433 "requirements" ,
14301434 "tags" ,
14311435 "date_added" ,
1436+ "training_data" ,
14321437 ]
14331438
14341439 @classmethod
@@ -1450,8 +1455,6 @@ def from_dict(cls, d, subdir=None):
14501455 if requirements is not None :
14511456 requirements = ModelRequirements .from_dict (requirements )
14521457
1453- tags = d .get ("tags" , None )
1454-
14551458 date_added = etau .parse_isotime (d .get ("date_added" ))
14561459
14571460 return cls (
@@ -1470,8 +1473,9 @@ def from_dict(cls, d, subdir=None):
14701473 "default_deployment_config_dict" , None
14711474 ),
14721475 requirements = requirements ,
1473- tags = tags ,
1476+ tags = d . get ( " tags" , None ) ,
14741477 date_added = date_added ,
1478+ training_data = d .get ("training_data" , None ),
14751479 )
14761480
14771481
0 commit comments