@@ -362,8 +362,6 @@ def fit(self, X, y=None, **kwargs):
362362
363363 # Create temporary directory and tables
364364 computation_dir = self ._create_computation_dir ("fit" )
365- initial_runner_temp_dir = kh .get_runner ().root_temp_dir
366- kh .get_runner ().root_temp_dir = computation_dir
367365
368366 # Create the dataset, fit the model and reset in case of any failure
369367 try :
@@ -377,7 +375,6 @@ def fit(self, X, y=None, **kwargs):
377375 # Cleanup and restore the runner's temporary dir
378376 finally :
379377 self ._cleanup_computation_dir (computation_dir )
380- kh .get_runner ().root_temp_dir = initial_runner_temp_dir
381378
382379 # If on "fitted" state then:
383380 # - self.model_ must be a DictionaryDomain
@@ -963,15 +960,13 @@ def _simplify(
963960 computation_dir = self ._create_computation_dir ("simplify" )
964961 output_dir = self ._get_output_dir (computation_dir )
965962 simplify_log_file_path = fs .get_child_path (output_dir , "khiops_simplify_cc.log" )
966- initial_runner_temp_dir = kh .get_runner ().root_temp_dir
967963 full_coclustering_file_path = fs .get_child_path (
968964 output_dir , "FullCoclustering.khcj"
969965 )
970966 simplified_coclustering_file_path = fs .get_child_path (
971967 output_dir , "Coclustering.khcj"
972968 )
973969 self .model_report_ .write_khiops_json_file (full_coclustering_file_path )
974- kh .get_runner ().root_temp_dir = computation_dir
975970 try :
976971 # - simplify_coclustering, then
977972 # - prepare_coclustering_deployment
@@ -1040,7 +1035,6 @@ def _simplify(
10401035 )
10411036 finally :
10421037 self ._cleanup_computation_dir (computation_dir )
1043- kh .get_runner ().root_temp_dir = initial_runner_temp_dir
10441038 return simplified_cc
10451039
10461040 def simplify (
@@ -1101,8 +1095,6 @@ def predict(self, X):
11011095 """
11021096 # Create temporary directory
11031097 computation_dir = self ._create_computation_dir ("predict" )
1104- initial_runner_temp_dir = kh .get_runner ().root_temp_dir
1105- kh .get_runner ().root_temp_dir = computation_dir
11061098
11071099 # Create the input dataset
11081100 ds = Dataset (X )
@@ -1119,7 +1111,6 @@ def predict(self, X):
11191111 # Cleanup and restore the runner's temporary dir
11201112 finally :
11211113 self ._cleanup_computation_dir (computation_dir )
1122- kh .get_runner ().root_temp_dir = initial_runner_temp_dir
11231114
11241115 # Transform to numpy.array
11251116 y_pred = y_pred .to_numpy ()
@@ -1557,8 +1548,6 @@ def predict(self, X):
15571548 """
15581549 # Create temporary directory
15591550 computation_dir = self ._create_computation_dir ("predict" )
1560- initial_runner_temp_dir = kh .get_runner ().root_temp_dir
1561- kh .get_runner ().root_temp_dir = computation_dir
15621551
15631552 try :
15641553 # Create the input dataset
@@ -1575,10 +1564,6 @@ def predict(self, X):
15751564 # Cleanup and restore the runner's temporary dir
15761565 finally :
15771566 self ._cleanup_computation_dir (computation_dir )
1578- kh .get_runner ().root_temp_dir = initial_runner_temp_dir
1579-
1580- # Restore the runner's temporary dir
1581- kh .get_runner ().root_temp_dir = initial_runner_temp_dir
15821567
15831568 # Return pd.Series in the monotable + pandas case
15841569 assert isinstance (y_pred , (str , pd .DataFrame )), "Expected str or DataFrame"
@@ -1997,8 +1982,6 @@ def predict_proba(self, X):
19971982 """
19981983 # Create temporary directory and tables
19991984 computation_dir = self ._create_computation_dir ("predict_proba" )
2000- initial_runner_temp_dir = kh .get_runner ().root_temp_dir
2001- kh .get_runner ().root_temp_dir = computation_dir
20021985
20031986 # Create the input dataset
20041987
@@ -2015,7 +1998,6 @@ def predict_proba(self, X):
20151998 # Cleanup and restore the runner's temporary dir
20161999 finally :
20172000 self ._cleanup_computation_dir (computation_dir )
2018- kh .get_runner ().root_temp_dir = initial_runner_temp_dir
20192001
20202002 # - Reorder the columns to that of self.classes_
20212003 # - Transform to np.ndarray
@@ -2649,8 +2631,6 @@ def transform(self, X):
26492631 """
26502632 # Create temporary directory
26512633 computation_dir = self ._create_computation_dir ("transform" )
2652- initial_runner_temp_dir = kh .get_runner ().root_temp_dir
2653- kh .get_runner ().root_temp_dir = computation_dir
26542634
26552635 # Create and transform the dataset
26562636 try :
@@ -2665,7 +2645,6 @@ def transform(self, X):
26652645 # Cleanup and restore the runner's temporary dir
26662646 finally :
26672647 self ._cleanup_computation_dir (computation_dir )
2668- kh .get_runner ().root_temp_dir = initial_runner_temp_dir
26692648 return X_transformed .to_numpy (copy = False )
26702649
26712650 def _transform_prepare_deployment_for_transform (self , ds ):
0 commit comments