ogert 3 anni fa
parent
commit
99722e669e

+ 1 - 1
cdplib/hyperopt/HyperoptPipelineSelector.py

@@ -12,6 +12,7 @@ Created on Tue Oct  6 15:04:25 2020
  the best pipeline so far as well as the entire tuning history
  if needed.
 """
+from __future__ import annotations
 
 import os
 import sys
@@ -38,7 +39,6 @@ if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
     Literal, Dict, List, Union
 else:
     # from typing_extensions import *
-    from __future__ import annotations
     Dict = dict
     List = list
     from typing_extensions import Callable, \

+ 2 - 1
cdplib/pipeline_selector/PipelineSelector.py

@@ -16,6 +16,7 @@ Created on Wed Sep 30 14:23:23 2020
  save the current best result in a file or database during training.
  Children classes: hyperopt and custom gridsearch.
 """
+from __future__ import annotations
 
 import pickle
 import os
@@ -34,7 +35,7 @@ if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
 else:
     # from typing_extensions import *
     print("I have python version {}.{} and will import typing_extensions".format(sys.version_info.major, sys.version_info.minor))
-    from __future__ import annotations
+    
     Dict = dict
     List = list
     from typing_extensions import Callable, TypedDict,\