]> AND Private Git Repository - predictops.git/blobdiff - predictops/engine.py
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Refactoring, fin du lever/coucher de soleil, et début de sentinelles
[predictops.git] / predictops / engine.py
index a63ef2932aee9086fb23ede8902ec4ea0820adb8..bb85787ca304aa2643a5c1e2c42e53362ced5689 100644 (file)
@@ -6,13 +6,15 @@ from pathlib import Path
 from shutil import rmtree
 
 import os
+import pytz
 
 from .learn.learning import Learning
 from .learn.preprocessing import Preprocessing
 from .source.ephemeris import Ephemeris
 from .source.holidays import Holidays
-from .source.ramadan import Ramadan
 from .source.meteofrance import MeteoFrance
+from .source.ramadan import Ramadan
+from .source.sentinelles import Sentinelles
 from .target.target import Target
 
 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
@@ -68,10 +70,10 @@ class Engine(object):
                 self._config_text += f"{'='*10} {os.path.basename(config_file)} {'='*10}\n\n"
                 self._config_text += f.read() + '\n\n'
 
-            ephemerides = Ephemeris(config_file=config_file)
+            ephemerides = Ephemeris(config_file=config_file, start=self._start, end=self._end)
 
-            ephemerides.start = self._start
-            ephemerides.end = self._end
+            ephemerides.start = self._start
+            ephemerides.end = self._end
 
             dated_features = ephemerides.dated_features
             for date in dated_features:
@@ -136,6 +138,8 @@ class Engine(object):
 
     def add_preprocessing(self):
         self._preproc = Preprocessing(config_file=self._config,
+                                      start=self._start, end=self._end,
+                                      timestep=self._timestep,
                                       dict_features=self.X,
                                       dict_target=self.y)