@@ -768,7 +768,7 @@ def _get_backend_for_auto_switch(
768768 from modin .core .execution .dispatching .factories .dispatcher import FactoryDispatcher
769769
770770 # Does not need to be secure, should not use system entropy
771- metrics_group = "%04x" % random .randrange (16 ** 4 )
771+ metrics_group = 1 # "%04x" % random.randrange(16**4)
772772 starting_backend = input_qc .get_backend ()
773773
774774 min_move_stay_delta = None
@@ -779,23 +779,23 @@ def _get_backend_for_auto_switch(
779779 operation = function_name ,
780780 arguments = arguments ,
781781 )
782- data_max_shape = input_qc ._max_shape ()
783- emit_metric (
784- f"hybrid.auto.api.{ class_of_wrapped_fn } .{ function_name } .group.{ metrics_group } " ,
785- 1 ,
786- )
787- emit_metric (
788- f"hybrid.auto.current.{ starting_backend } .group.{ metrics_group } .stay_cost" ,
789- stay_cost ,
790- )
791- emit_metric (
792- f"hybrid.auto.current.{ starting_backend } .group.{ metrics_group } .rows" ,
793- data_max_shape [0 ],
794- )
795- emit_metric (
796- f"hybrid.auto.current.{ starting_backend } .group.{ metrics_group } .cols" ,
797- data_max_shape [1 ],
798- )
782+ # data_max_shape = input_qc._max_shape()
783+ # emit_metric(
784+ # f"hybrid.auto.api.{class_of_wrapped_fn}.{function_name}.group.{metrics_group}",
785+ # 1,
786+ # )
787+ # emit_metric(
788+ # f"hybrid.auto.current.{starting_backend}.group.{metrics_group}.stay_cost",
789+ # stay_cost,
790+ # )
791+ # emit_metric(
792+ # f"hybrid.auto.current.{starting_backend}.group.{metrics_group}.rows",
793+ # data_max_shape[0],
794+ # )
795+ # emit_metric(
796+ # f"hybrid.auto.current.{starting_backend}.group.{metrics_group}.cols",
797+ # data_max_shape[1],
798+ # )
799799 for backend in Backend .get_active_backends ():
800800 if backend in ("Ray" , "Unidist" , "Dask" ):
801801 # Disable automatically switching to these engines for now, because
@@ -840,35 +840,36 @@ def _get_backend_for_auto_switch(
840840 ):
841841 min_move_stay_delta = move_stay_delta
842842 best_backend = backend
843- emit_metric (
844- f"hybrid.auto.candidate.{ backend } .group.{ metrics_group } .move_to_cost" ,
845- move_to_cost ,
846- )
847- emit_metric (
848- f"hybrid.auto.candidate.{ backend } .group.{ metrics_group } .other_execute_cost" ,
849- other_execute_cost ,
850- )
851- emit_metric (
852- f"hybrid.auto.candidate.{ backend } .group.{ metrics_group } .delta" ,
853- move_stay_delta ,
854- )
855-
856- get_logger ().info (
857- f"After { _normalize_class_name (class_of_wrapped_fn )} function { function_name } , "
858- + f"considered moving to backend { backend } with "
859- + f"(transfer_cost { move_to_cost } + other_execution_cost { other_execute_cost } ) "
860- + f", stay_cost { stay_cost } , and move-stay delta "
861- + f"{ move_stay_delta } "
862- )
843+ # emit_metric(
844+ # f"hybrid.auto.candidate.{backend}.group.{metrics_group}.move_to_cost",
845+ # move_to_cost,
846+ # )
847+ # emit_metric(
848+ # f"hybrid.auto.candidate.{backend}.group.{metrics_group}.other_execute_cost",
849+ # other_execute_cost,
850+ # )
851+ # emit_metric(
852+ # f"hybrid.auto.candidate.{backend}.group.{metrics_group}.delta",
853+ # move_stay_delta,
854+ # )
855+
856+ # get_logger().info(
857+ # f"After {_normalize_class_name(class_of_wrapped_fn)} function {function_name}, "
858+ # + f"considered moving to backend {backend} with "
859+ # + f"(transfer_cost {move_to_cost} + other_execution_cost {other_execute_cost}) "
860+ # + f", stay_cost {stay_cost}, and move-stay delta "
861+ # + f"{move_stay_delta}"
862+ # )
863863
864864 if best_backend == starting_backend :
865- emit_metric (f"hybrid.auto.decision.{ best_backend } .group.{ metrics_group } " , 0 )
866- get_logger ().info (
867- f"Chose not to switch backends after operation { function_name } "
868- )
865+ pass
866+ #emit_metric(f"hybrid.auto.decision.{best_backend}.group.{metrics_group}", 0)
867+ #get_logger().info(
868+ # f"Chose not to switch backends after operation {function_name}"
869+ #)
869870 else :
870871 emit_metric (f"hybrid.auto.decision.{ best_backend } .group.{ metrics_group } " , 1 )
871- get_logger ().info (f"Chose to move to backend { best_backend } " )
872+ # get_logger().info(f"Chose to move to backend {best_backend}")
872873 return best_backend
873874
874875
0 commit comments