@@ -669,8 +669,8 @@ def _download_file(self, url_ext: str) -> Path:
669669 -------
670670 Path
671671 """
672- response = self ._http .get (url_ext , enable_cache = True )
673- return self ._http .cache_path_from_response ( response )
672+ self ._http .get (url_ext , enable_cache = True )
673+ return self ._http .cache_path_from_url ( url_ext )
674674
675675 def download_features_file (self , dataset_id : int ) -> Path :
676676 """Download features file.
@@ -776,8 +776,9 @@ def download_dataset_arff(
776776 raise TypeError ("`description` should be either OpenMLDataset or Dict." )
777777
778778 try :
779- response = self ._http .get (url , enable_cache = True , md5_checksum = md5_checksum_fixture )
780- output_file_path = self ._http .cache_path_from_response (response )
779+ # save the file in cache and get it's path
780+ self ._http .get (url , enable_cache = True , md5_checksum = md5_checksum_fixture )
781+ output_file_path = self ._http .cache_path_from_url (url )
781782 except OpenMLHashException as e :
782783 additional_info = f" Raised when downloading dataset { did } ."
783784 e .args = (e .args [0 ] + additional_info ,)
@@ -1368,8 +1369,8 @@ def _download_file(self, url_ext: str) -> Path:
13681369 -------
13691370 Path
13701371 """
1371- response = self ._http .get (url_ext , enable_cache = True )
1372- return self ._http .cache_path_from_response ( response )
1372+ self ._http .get (url_ext , enable_cache = True )
1373+ return self ._http .cache_path_from_url ( url_ext )
13731374
13741375 def download_features_file (self , dataset_id : int ) -> Path :
13751376 """Download features file.
@@ -1471,8 +1472,9 @@ def download_dataset_arff(
14711472 raise TypeError ("`description` should be either OpenMLDataset or Dict." )
14721473
14731474 try :
1474- response = self ._http .get (url , enable_cache = True )
1475- output_file_path = self ._http .cache_path_from_response (response )
1475+ # save the file in cache and get it's path
1476+ self ._http .get (url , enable_cache = True )
1477+ output_file_path = self ._http .cache_path_from_url (url )
14761478 except OpenMLHashException as e :
14771479 additional_info = f" Raised when downloading dataset { did } ."
14781480 e .args = (e .args [0 ] + additional_info ,)
0 commit comments