-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/Hexy00123/Sum2024MLOps into dev
- Loading branch information
Showing
8 changed files
with
57 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from typing import Tuple | ||
|
||
import pandas as pd | ||
import pytest | ||
from hydra import initialize, compose | ||
from omegaconf import DictConfig | ||
|
||
from src.data import ( | ||
read_datastore, | ||
preprocess_data, | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def cfg() -> DictConfig: | ||
""" | ||
Load the test_config.yaml configuration file | ||
""" | ||
with initialize(config_path="../configs", version_base=None): | ||
cfg = compose(config_name="test_config") | ||
return cfg | ||
|
||
|
||
@pytest.fixture | ||
def raw_sample(cfg) -> pd.DataFrame: | ||
df = read_datastore(cfg) | ||
return df | ||
|
||
|
||
@pytest.fixture | ||
def preprocessed_sample(raw_sample) -> Tuple[pd.DataFrame, pd.Series]: | ||
X, y = preprocess_data(raw_sample) | ||
return X, y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters