7474]
7575
7676
77- class SourceCode (BaseModel ):
77+ class BaseConfig (BaseModel ):
78+ """BaseConfig"""
79+
80+ model_config = ConfigDict (validate_assignment = True , extra = "forbid" )
81+
82+
83+ class SourceCode (BaseConfig ):
7884 """SourceCode.
7985
8086 The SourceCode class allows the user to specify the source code location, dependencies,
@@ -94,8 +100,6 @@ class SourceCode(BaseModel):
94100 If not specified, entry_script must be provided.
95101 """
96102
97- model_config = ConfigDict (validate_assignment = True , extra = "forbid" )
98-
99103 source_dir : Optional [str ] = None
100104 requirements : Optional [str ] = None
101105 entry_script : Optional [str ] = None
@@ -196,7 +200,7 @@ def _to_vpc_config(self) -> shapes.VpcConfig:
196200 return shapes .VpcConfig (** filtered_dict )
197201
198202
199- class InputData (BaseModel ):
203+ class InputData (BaseConfig ):
200204 """InputData.
201205
202206 This config allows the user to specify an input data source for the training job.
@@ -217,7 +221,5 @@ class InputData(BaseModel):
217221 S3DataSource object, or FileSystemDataSource object.
218222 """
219223
220- model_config = ConfigDict (validate_assignment = True , extra = "forbid" )
221-
222224 channel_name : str = None
223225 data_source : Union [str , FileSystemDataSource , S3DataSource ] = None
0 commit comments