Skip to content

Commit fba8836

Browse files
committed
Fix format/linting
Linting fix Delete dags/dags/tpu_observability directory Delete dags/airflow_monitoring.py
1 parent 30be809 commit fba8836

3 files changed

Lines changed: 7 additions & 44 deletions

File tree

dags/airflow_monitoring.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

dags/dags/tpu_observability/jobset_healthiness_ready.py renamed to dags/tpu_observability/jobset_healthiness_ready.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,5 @@ def generate_second_node_pool_name(
197197
>> validate_ready_replicas
198198
>> cleanup_workload
199199
>> cleanup_node_pool
200-
201200
)
202201
# pylint: enable=pointless-statement

dags/tpu_observability/utils/jobset_util.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,21 +563,21 @@ def validate_jobset_replica_number(
563563
correct_replica_num: int,
564564
):
565565
"""
566-
A sensor which checks if are any jobset replicas in a status type.
566+
A sensor which checks if the correct number jobset replicas in a status type.
567567
568568
Args:
569-
replica_type(str): The type of status being checked for.
570-
job_name(str): The name of the job replica which is run from the jobset.
571-
node_pool(Info): The Info object containing the cluster information needed
572-
for the kubernetes API to connect to it.
569+
node_pool: Configuration object with cluster details.
570+
jobset_config: Configuration of JobSet which is being run.
571+
replica_type(str): The name of the type of status being checked for.
572+
correct_replica_num(int): The expected number of replicas to be found.
573573
"""
574574
logging.info("Checking for number of replicas of type: %s", replica_type)
575575
ready_replicas = get_replica_num(
576576
replica_type=replica_type,
577-
job_name=job_name,
577+
job_name=jobset_config.replicated_job_name,
578578
node_pool=node_pool,
579579
)
580-
return ready_replicas > 0
580+
return ready_replicas == correct_replica_num
581581

582582

583583
@task.sensor(poke_interval=30, timeout=600, mode="reschedule")

0 commit comments

Comments
 (0)