Skip to content

Commit be174f8

Browse files
committed
Update test.
1 parent ba5659f commit be174f8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ads/jobs/builders/infrastructure/dsc_job.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,18 @@ def _update_job_infra(self, dsc_job: DSCJob) -> DataScienceJob:
16011601
if value:
16021602
dsc_job.job_infrastructure_configuration_details[camel_attr] = value
16031603

1604+
shape = dsc_job.job_infrastructure_configuration_details.get("shapeName", "")
1605+
if (
1606+
shape
1607+
and not str(shape).endswith("Flex")
1608+
and dsc_job.job_infrastructure_configuration_details.get(
1609+
"jobShapeConfigDetails"
1610+
)
1611+
):
1612+
raise ValueError(
1613+
"Shape config is not required for non flex shape from user end."
1614+
)
1615+
16041616
if dsc_job.job_infrastructure_configuration_details.get("subnetId"):
16051617
dsc_job.job_infrastructure_configuration_details[
16061618
"jobInfrastructureType"
@@ -1648,7 +1660,9 @@ def init(self, **kwargs) -> DataScienceJob:
16481660
def _config_multi_node(self, runtime: MultiNodeRuntime):
16491661
"""Configure the payload for multi-node job run."""
16501662
infra_config: dict = self.dsc_job.job_infrastructure_configuration_details
1651-
job_config: models.DefaultJobConfigurationDetails = self.dsc_job.job_configuration_details
1663+
job_config: models.DefaultJobConfigurationDetails = (
1664+
self.dsc_job.job_configuration_details
1665+
)
16521666
env_config = self.dsc_job.job_environment_configuration_details
16531667
# For multi-node jobs,
16541668
# the job_infrastructure_configuration_details and job_configuration_details

0 commit comments

Comments
 (0)