1
1
import time
2
2
from abc import ABC , abstractmethod
3
3
from enum import Enum
4
- from typing import List , Tuple
5
4
6
5
from palimpzest .core .data .dataclasses import ExecutionStats , PlanStats
7
6
from palimpzest .core .elements .records import DataRecord
@@ -26,7 +25,7 @@ def __init__(self,
26
25
scan_start_idx : int = 0 ,
27
26
datadir : DataDirectory | None = None ,
28
27
max_workers : int | None = None ,
29
- nocache : bool = False ,
28
+ nocache : bool = True ,
30
29
verbose : bool = False ):
31
30
self .scan_start_idx = scan_start_idx
32
31
self .datadir = datadir
@@ -42,23 +41,23 @@ def execute_plan(
42
41
plan : PhysicalPlan ,
43
42
num_samples : int | float = float ("inf" ),
44
43
workers : int = 1
45
- ) -> Tuple [ List [DataRecord ], PlanStats ]:
44
+ ) -> tuple [ list [DataRecord ], PlanStats ]:
46
45
"""Execute a single plan according to strategy"""
47
46
pass
48
47
49
48
50
49
@abstractmethod
51
50
def _should_stop_execution (
52
51
self ,
53
- records : List [DataRecord ],
54
- plan_stats : List [PlanStats ]
52
+ records : list [DataRecord ],
53
+ plan_stats : list [PlanStats ]
55
54
) -> bool :
56
55
"""Override to implement early stopping logic"""
57
56
return False
58
57
59
58
def _create_execution_stats (
60
59
self ,
61
- plan_stats : List [PlanStats ],
60
+ plan_stats : list [PlanStats ],
62
61
start_time : float
63
62
) -> ExecutionStats :
64
63
"""Create execution statistics"""
@@ -71,8 +70,8 @@ def _create_execution_stats(
71
70
72
71
def _should_stop_execution (
73
72
self ,
74
- records : List [DataRecord ],
75
- plan_stats : List [PlanStats ]
73
+ records : list [DataRecord ],
74
+ plan_stats : list [PlanStats ]
76
75
) -> bool :
77
76
"""Override to implement early stopping logic"""
78
77
return False
0 commit comments