Skip to content

Commit

Permalink
renaming the main module from forecasting_sa to mmf_sa
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuta-yoshimatsu committed May 20, 2024
1 parent 796fce7 commit a800d4f
Show file tree
Hide file tree
Showing 39 changed files with 68 additions and 68 deletions.
4 changes: 2 additions & 2 deletions forecasting_sa/AutoEDA.py → mmf_sa/AutoEDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,10 @@ def add_title_and_describtion(self, html_object: str, title: "", describtion: ""

def report_generation_new(self):
def load_html():
import forecasting_sa.html_templates
import mmf_sa.html_templates

html_template = pkg_resources.read_text(
sys.modules["forecasting_sa.html_templates"], "eda_template_v2.html"
sys.modules["mmf_sa.html_templates"], "eda_template_v2.html"
)
return html_template

Expand Down
6 changes: 3 additions & 3 deletions forecasting_sa/Forecaster.py → mmf_sa/Forecaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
IntegerType,
)
from pyspark.sql.functions import lit, avg, min, max, col, posexplode, collect_list, to_date
from forecasting_sa.models.abstract_model import ForecastingRegressor
from forecasting_sa.models import ModelRegistry
from forecasting_sa.data_quality_checks import DataQualityChecks
from mmf_sa.models.abstract_model import ForecastingRegressor
from mmf_sa.models import ModelRegistry
from mmf_sa.data_quality_checks import DataQualityChecks
_logger = logging.getLogger(__name__)
os.environ['NIXTLA_ID_AS_COL'] = '1'
mlflow.set_registry_uri("databricks-uc")
Expand Down
2 changes: 1 addition & 1 deletion forecasting_sa/__init__.py → mmf_sa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from omegaconf.basecontainer import BaseContainer
from pyspark.sql import SparkSession, DataFrame

from forecasting_sa.Forecaster import Forecaster
from mmf_sa.Forecaster import Forecaster


def run_forecast(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions forecasting_sa/jobs/eda_job.py → mmf_sa/jobs/eda_job.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import mlflow
from mlflow.tracking import MlflowClient

from forecasting_sa.AutoEDA import AutoEDA
from forecasting_sa.common import Job
from mmf_sa.AutoEDA import AutoEDA
from mmf_sa.common import Job


class EDAJob(Job):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import mlflow
from mlflow.tracking import MlflowClient

from forecasting_sa.Forecaster import Forecaster
from forecasting_sa.common import Job
from mmf_sa.Forecaster import Forecaster
from mmf_sa.common import Job


class ForecastingJob(Job):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import mlflow
from mlflow.tracking import MlflowClient

from forecasting_sa.Forecaster import Forecaster
from forecasting_sa.common import Job
from mmf_sa.Forecaster import Forecaster
from mmf_sa.common import Job


class RetrainingEvaluationJob(Job):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
import importlib.resources as pkg_resources
from omegaconf import OmegaConf, DictConfig
from forecasting_sa.models.abstract_model import ForecastingRegressor
from mmf_sa.models.abstract_model import ForecastingRegressor


class ModelRegistry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def prepare_data(self, df: pd.DataFrame) -> pd.DataFrame:
return df

@abstractmethod
def fit(self, x, y=None, spark=None):
def fit(self, x, y=None):
pass

@abstractmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ promoted_props:
models:

StatsForecastBaselineWindowAverage:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcBaselineWindowAverage
framework: StatsForecast
model_type: local
Expand All @@ -28,7 +28,7 @@ models:
window_size: 7

StatsForecastBaselineSeasonalWindowAverage:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcBaselineSeasonalWindowAverage
framework: StatsForecast
model_type: local
Expand All @@ -38,14 +38,14 @@ models:
window_size: 7

StatsForecastBaselineNaive:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcBaselineNaive
framework: StatsForecast
model_type: local
trainable: false

StatsForecastBaselineSeasonalNaive:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcBaselineSeasonalNaive
framework: StatsForecast
model_type: local
Expand All @@ -54,7 +54,7 @@ models:
season_length: 7

StatsForecastAutoArima:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcAutoArima
framework: StatsForecast
model_type: local
Expand All @@ -65,7 +65,7 @@ models:
level:

StatsForecastAutoETS:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcAutoETS
framework: StatsForecast
model_type: local
Expand All @@ -75,7 +75,7 @@ models:
model_type: "ZZZ"

StatsForecastAutoCES:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcAutoCES
framework: StatsForecast
model_type: local
Expand All @@ -85,7 +85,7 @@ models:
model_type: "Z"

StatsForecastAutoTheta:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcAutoTheta
framework: StatsForecast
model_type: local
Expand All @@ -95,7 +95,7 @@ models:
decomposition_type: "multiplicative"

StatsForecastTSB:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcTSB
framework: StatsForecast
model_type: local
Expand All @@ -105,47 +105,47 @@ models:
alpha_p: 0.2

StatsForecastADIDA:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcADIDA
framework: StatsForecast
model_type: local
trainable: false
model_spec:

StatsForecastIMAPA:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcIMAPA
framework: StatsForecast
model_type: local
trainable: false
model_spec:

StatsForecastCrostonClassic:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcCrostonClassic
framework: StatsForecast
model_type: local
trainable: false
model_spec:

StatsForecastCrostonOptimized:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcCrostonOptimized
framework: StatsForecast
model_type: local
trainable: false
model_spec:

StatsForecastCrostonSBA:
module: forecasting_sa.models.statsforecast.StatsFcForecastingPipeline
module: mmf_sa.models.statsforecast.StatsFcForecastingPipeline
model_class: StatsFcCrostonSBA
framework: StatsForecast
model_type: local
trainable: false
model_spec:

RFableArima:
module: forecasting_sa.models.r_fable.RFableForecastingPipeline
module: mmf_sa.models.r_fable.RFableForecastingPipeline
model_class: RFableModel
framework: RFable
model_type: local
Expand All @@ -154,7 +154,7 @@ models:
season_length:

RFableETS:
module: forecasting_sa.models.r_fable.RFableForecastingPipeline
module: mmf_sa.models.r_fable.RFableForecastingPipeline
model_class: RFableModel
framework: RFable
model_type: local
Expand All @@ -163,7 +163,7 @@ models:
season_length:

RFableNNETAR:
module: forecasting_sa.models.r_fable.RFableForecastingPipeline
module: mmf_sa.models.r_fable.RFableForecastingPipeline
model_class: RFableModel
framework: RFable
model_type: local
Expand All @@ -172,14 +172,14 @@ models:
season_length:

RFableEnsemble:
module: forecasting_sa.models.r_fable.RFableForecastingPipeline
module: mmf_sa.models.r_fable.RFableForecastingPipeline
model_class: RFableModel
framework: RFable
model_type: local
trainable: false

RDynamicHarmonicRegression:
module: forecasting_sa.models.r_fable.RFableForecastingPipeline
module: mmf_sa.models.r_fable.RFableForecastingPipeline
model_class: RFableModel
framework: RFable
model_type: local
Expand All @@ -188,7 +188,7 @@ models:
fourier_terms:

SKTimeLgbmDsDt:
module: forecasting_sa.models.sktime.SKTimeForecastingPipeline
module: mmf_sa.models.sktime.SKTimeForecastingPipeline
model_class: SKTimeLgbmDsDt
framework: SKTime
model_type: local
Expand All @@ -200,7 +200,7 @@ models:
detrend_poly_degree: 2

SKTimeTBats:
module: forecasting_sa.models.sktime.SKTimeForecastingPipeline
module: mmf_sa.models.sktime.SKTimeForecastingPipeline
model_class: SKTimeTBats
framework: SKTime
model_type: local
Expand All @@ -212,7 +212,7 @@ models:
season_length: 7

NeuralForecastRNN:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcRNN
framework: NeuralForecast
model_type: global
Expand All @@ -232,7 +232,7 @@ models:
decoder_layers: 2

NeuralForecastLSTM:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcLSTM
framework: NeuralForecast
model_type: global
Expand All @@ -251,7 +251,7 @@ models:
decoder_layers: 2

NeuralForecastNBEATSx:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcNBEATSx
framework: NeuralForecast
model_type: global
Expand All @@ -267,7 +267,7 @@ models:
dropout_prob_theta: 0.0

NeuralForecastNHITS:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcNHITS
framework: NeuralForecast
model_type: global
Expand All @@ -287,7 +287,7 @@ models:
pooling_mode: MaxPool1d

NeuralForecastAutoRNN:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcAutoRNN
framework: NeuralForecast
model_type: global
Expand All @@ -302,7 +302,7 @@ models:
decoder_hidden_size: [ 64, 128, 256, 512 ]

NeuralForecastAutoLSTM:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcAutoLSTM
framework: NeuralForecast
model_type: global
Expand All @@ -317,7 +317,7 @@ models:
decoder_hidden_size: [ 64, 128, 256, 512 ]

NeuralForecastAutoNBEATSx:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcAutoNBEATSx
framework: NeuralForecast
model_type: global
Expand All @@ -330,7 +330,7 @@ models:
scaler_type: [ "robust", "standard" ]

NeuralForecastAutoNHITS:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcAutoNHITS
framework: NeuralForecast
model_type: global
Expand All @@ -345,7 +345,7 @@ models:
scaler_type: [ "robust", "standard" ]

NeuralForecastAutoTiDE:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcAutoTiDE
framework: NeuralForecast
model_type: global
Expand All @@ -365,7 +365,7 @@ models:
layernorm: [ True, False ]

NeuralForecastAutoPatchTST:
module: forecasting_sa.models.neuralforecast.NeuralForecastPipeline
module: mmf_sa.models.neuralforecast.NeuralForecastPipeline
model_class: NeuralFcAutoPatchTST
framework: NeuralForecast
model_type: global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
from sktime.performance_metrics.forecasting import mean_absolute_percentage_error
from neuralforecast import NeuralForecast
from forecasting_sa.models.abstract_model import ForecastingRegressor
from mmf_sa.models.abstract_model import ForecastingRegressor
from neuralforecast.auto import (
RNN,
LSTM,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.pipeline import Pipeline

from forecasting_sa.models.abstract_model import ForecastingSARegressor
from forecasting_sa.models.pytorch_forecasting.PyTorchForecastingModel import (
from mmf_sa.models.abstract_model import ForecastingRegressor
from mmf_sa.models.pytorch_forecasting.PyTorchForecastingModel import (
PyTorchForecastingRegressor,
)


class PyTorchForecastingPipelineRegressor(ForecastingSARegressor):
class PyTorchForecastingPipelineRegressor(ForecastingRegressor):
def __init__(self, params):
super().__init__(params)
self.params = params
Expand Down
Loading

0 comments on commit a800d4f

Please sign in to comment.