@@ -312,6 +312,11 @@ def load(self, verbose: int = 0):
312312 print (f"[CubeLogs.load] done, shape={ self .shape } " )
313313 return self
314314
315+ def _process_formula (
316+ self , formula : Union [str , Callable [[pandas .DataFrame ], pandas .Series ]]
317+ ) -> Callable [[pandas .DataFrame ], pandas .Series ]:
318+ return formula
319+
315320 @property
316321 def shape (self ) -> Tuple [int , int ]:
317322 "Returns the shape."
@@ -650,22 +655,36 @@ class CubeLogsPerformance(CubeLogs):
650655 def __init__ (
651656 self ,
652657 data : Any ,
653- time : str = "date" ,
654- keys : Sequence [str ] = ("version_.*" , "model_.*" ),
655- values : Sequence [str ] = ("time_.*" , "disc_.*" , "ERR_.*" ),
656- ignored : Sequence [str ] = (),
657- recent : bool = False ,
658+ time : str = "DATE" ,
659+ keys : Sequence [str ] = (
660+ "^version_.*" ,
661+ "^model_.*" ,
662+ "providers" ,
663+ "opt_patterns" ,
664+ "suite" ,
665+ "memory_peak" ,
666+ "machine" ,
667+ "exporter" ,
668+ "dynamic" ,
669+ "rtopt" ,
670+ "dtype" ,
671+ "device" ,
672+ "architecture" ,
673+ ),
674+ values : Sequence [str ] = ("^time_.*" , "^disc.*" , "^ERR_.*" , "CMD" , "^ITER" ),
675+ ignored : Sequence [str ] = ("version_python" ,),
676+ recent : bool = True ,
658677 formulas : Optional [
659678 Dict [str , Union [str , Callable [[pandas .DataFrame ], pandas .Series ]]]
660- ] = None ,
679+ ] = ( "speedup" , "bucket[speedup]" , "ERR1" ) ,
661680 ):
662681 self ._data = data
663682 self ._time = time
664683 self ._keys = keys
665684 self ._values = values
666685 self ._ignored = ignored
667686 self .recent = recent
668- self ._formulas = formulas
687+ self ._formulas = formulas # type: ignore[assignment]
669688
670689 def _process_formula (
671690 self , formula : Union [str , Callable [[pandas .DataFrame ], pandas .Series ]]
@@ -793,7 +812,7 @@ def make_view_def(self, name: str) -> CubeViewDef:
793812 ),
794813 ignore_unique = True ,
795814 key_agg = ["model_name" ],
796- agg_args = "mean"
815+ agg_args = "mean" ,
797816 )
798817 if name == "disc" :
799818 return CubeViewDef (
0 commit comments