Skip to content

Commit

Permalink
Correct imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ovejabu committed Jun 5, 2024
1 parent 2ba837a commit 2ec89c4
Show file tree
Hide file tree
Showing 25 changed files with 55 additions and 55 deletions.
4 changes: 2 additions & 2 deletions ml_garden/core/data_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from explainerdashboard.explainers import BaseExplainer
from sklearn.compose import ColumnTransformer

from pipeline_lib.core.model import Model
from pipeline_lib.utils.compression_utils import compress_zipfile, decompress_zipfile
from ml_garden.core.model import Model
from ml_garden.utils.compression_utils import compress_zipfile, decompress_zipfile


class DataContainer:
Expand Down
2 changes: 1 addition & 1 deletion ml_garden/core/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
import pkgutil

from pipeline_lib.core.model import Model
from ml_garden.core.model import Model


class ModelClassNotFoundError(Exception):
Expand Down
10 changes: 5 additions & 5 deletions ml_garden/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import mlflow
import pandas as pd

from pipeline_lib.core.data_container import DataContainer
from pipeline_lib.core.model_registry import ModelRegistry
from pipeline_lib.core.random_state_generator import initialize_random_state
from pipeline_lib.core.step_registry import StepRegistry
from pipeline_lib.core.steps import PipelineStep
from ml_garden.core.data_container import DataContainer
from ml_garden.core.model_registry import ModelRegistry
from ml_garden.core.random_state_generator import initialize_random_state
from ml_garden.core.step_registry import StepRegistry
from ml_garden.core.steps import PipelineStep


class Pipeline:
Expand Down
2 changes: 1 addition & 1 deletion ml_garden/core/step_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import pkgutil

from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core.steps.base import PipelineStep


class StepClassNotFoundError(Exception):
Expand Down
2 changes: 1 addition & 1 deletion ml_garden/core/steps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from abc import ABC, abstractmethod
from typing import Optional

from pipeline_lib.core.data_container import DataContainer
from ml_garden.core.data_container import DataContainer


class PipelineStep(ABC):
Expand Down
4 changes: 2 additions & 2 deletions ml_garden/core/steps/calculate_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import pandas as pd
from pandas.api.types import is_datetime64_any_dtype

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core import DataContainer
from ml_garden.core.steps.base import PipelineStep


class UnsupportedFeatureError(Exception):
Expand Down
4 changes: 2 additions & 2 deletions ml_garden/core/steps/calculate_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import pandas as pd
from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core import DataContainer
from ml_garden.core.steps.base import PipelineStep


class CalculateMetricsStep(PipelineStep):
Expand Down
4 changes: 2 additions & 2 deletions ml_garden/core/steps/calculate_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import shap
from tqdm import tqdm

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core import DataContainer
from ml_garden.core.steps.base import PipelineStep


class CalculateReportsStep(PipelineStep):
Expand Down
4 changes: 2 additions & 2 deletions ml_garden/core/steps/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import pandas as pd

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core import DataContainer
from ml_garden.core.steps.base import PipelineStep


class CleanStep(PipelineStep):
Expand Down
4 changes: 2 additions & 2 deletions ml_garden/core/steps/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import OrdinalEncoder

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core import DataContainer
from ml_garden.core.steps.base import PipelineStep


class EncodeStep(PipelineStep):
Expand Down
6 changes: 3 additions & 3 deletions ml_garden/core/steps/explainer_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import pandas as pd
from explainerdashboard import RegressionExplainer

from pipeline_lib.core import DataContainer
from pipeline_lib.core.random_state_generator import get_random_state
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core import DataContainer
from ml_garden.core.random_state_generator import get_random_state
from ml_garden.core.steps.base import PipelineStep


class ExplainerDashboardStep(PipelineStep):
Expand Down
6 changes: 3 additions & 3 deletions ml_garden/core/steps/fit_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
root_mean_squared_error,
)

from pipeline_lib.core import DataContainer
from pipeline_lib.core.model import Model
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core import DataContainer
from ml_garden.core.model import Model
from ml_garden.core.steps.base import PipelineStep


class OptunaOptimizer:
Expand Down
6 changes: 3 additions & 3 deletions ml_garden/core/steps/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import pandas as pd

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.base import PipelineStep
from pipeline_lib.utils.df_type_conversions import apply_all_dtype_conversions
from ml_garden.core import DataContainer
from ml_garden.core.steps.base import PipelineStep
from ml_garden.utils.df_type_conversions import apply_all_dtype_conversions


class FileType(Enum):
Expand Down
8 changes: 4 additions & 4 deletions ml_garden/core/steps/tabular_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import pandas as pd
from sklearn.model_selection import train_test_split

from pipeline_lib.core import DataContainer
from pipeline_lib.core.random_state_generator import get_random_state
from pipeline_lib.core.steps.base import PipelineStep
from pipeline_lib.utils.string_utils import concatenate_columns
from ml_garden.core import DataContainer
from ml_garden.core.random_state_generator import get_random_state
from ml_garden.core.steps.base import PipelineStep
from ml_garden.utils.string_utils import concatenate_columns


class TabularSplitStep(PipelineStep):
Expand Down
4 changes: 2 additions & 2 deletions ml_garden/implementation/tabular/xgboost/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import pandas as pd
import xgboost as xgb

from pipeline_lib.core.model import Model
from pipeline_lib.utils import compression_utils
from ml_garden.core.model import Model
from ml_garden.utils import compression_utils

logger = logging.getLogger(__file__)

Expand Down
4 changes: 2 additions & 2 deletions tests/core/steps/test_calculate_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import pandas as pd
import pytest

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.calculate_features import (
from ml_garden.core import DataContainer
from ml_garden.core.steps.calculate_features import (
CalculateFeaturesStep,
UnsupportedFeatureError,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/core/steps/test_calculate_metrics.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pandas as pd
import pytest

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps import CalculateMetricsStep
from ml_garden.core import DataContainer
from ml_garden.core.steps import CalculateMetricsStep


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions tests/core/steps/test_clean.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pandas as pd
import pytest

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps.clean import CleanStep
from ml_garden.core import DataContainer
from ml_garden.core.steps.clean import CleanStep


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions tests/core/steps/test_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import pandas.testing as pdt
import pytest

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps import EncodeStep
from ml_garden.core import DataContainer
from ml_garden.core.steps import EncodeStep


@pytest.fixture
Expand Down
6 changes: 3 additions & 3 deletions tests/core/steps/test_fit_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import pandas as pd
import pytest

from pipeline_lib.core import DataContainer
from pipeline_lib.core.model import Model
from pipeline_lib.core.steps.fit_model import ModelStep, OptunaOptimizer
from ml_garden.core import DataContainer
from ml_garden.core.model import Model
from ml_garden.core.steps.fit_model import ModelStep, OptunaOptimizer


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions tests/core/steps/test_generate.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
import pytest

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps import GenerateStep
from ml_garden.core import DataContainer
from ml_garden.core.steps import GenerateStep


# Fixture to create a sample CSV file for testing
Expand Down
4 changes: 2 additions & 2 deletions tests/core/steps/test_tabular_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import pandas as pd
import pytest

from pipeline_lib.core import DataContainer
from pipeline_lib.core.steps import TabularSplitStep
from ml_garden.core import DataContainer
from ml_garden.core.steps import TabularSplitStep


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import pytest

from pipeline_lib.core.model import Model
from pipeline_lib.core.model_registry import ModelClassNotFoundError, ModelRegistry
from ml_garden.core.model import Model
from ml_garden.core.model_registry import ModelClassNotFoundError, ModelRegistry


class DummyModel(Model):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd
import pytest

from pipeline_lib import Pipeline
from ml_garden import Pipeline


def test_simple_train_pipeline():
Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_step_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import pytest

from pipeline_lib.core.step_registry import StepClassNotFoundError, StepRegistry
from pipeline_lib.core.steps.base import PipelineStep
from ml_garden.core.step_registry import StepClassNotFoundError, StepRegistry
from ml_garden.core.steps.base import PipelineStep


class DummyStep(PipelineStep):
Expand Down

0 comments on commit 2ec89c4

Please sign in to comment.