diff --git a/dvc.lock b/dvc.lock index f94987b..9fd128b 100644 --- a/dvc.lock +++ b/dvc.lock @@ -54,7 +54,7 @@ stages: outs: - path: data/models/c1_BoW_Sentiment_Model.pkl hash: md5 - md5: 8bc1bbdfd5c667b323c02df7b4683138 + md5: 8f65f22eed5c5f896795fa15c0255e1c size: 39823 - path: data/models/c2_Classifier_Sentiment_Model hash: md5 @@ -76,7 +76,7 @@ stages: deps: - path: data/models/c1_BoW_Sentiment_Model.pkl hash: md5 - md5: 8bc1bbdfd5c667b323c02df7b4683138 + md5: 8f65f22eed5c5f896795fa15c0255e1c size: 39823 - path: data/models/c2_Classifier_Sentiment_Model hash: md5 @@ -100,7 +100,7 @@ stages: deps: - path: data/models/c1_BoW_Sentiment_Model.pkl hash: md5 - md5: 8bc1bbdfd5c667b323c02df7b4683138 + md5: 8f65f22eed5c5f896795fa15c0255e1c size: 39823 - path: data/models/c2_Classifier_Sentiment_Model hash: md5 diff --git a/reports/coverage-report.xml b/reports/coverage-report.xml index 932e9f2..4eb7459 100644 --- a/reports/coverage-report.xml +++ b/reports/coverage-report.xml @@ -1,5 +1,5 @@ - + diff --git a/reports/mllint_report.md b/reports/mllint_report.md index c74dbcd..063e477 100644 --- a/reports/mllint_report.md +++ b/reports/mllint_report.md @@ -1,13 +1,13 @@ # ML Project Report **Project** | **Details** --------|-------- -Date | Mon, 26 Jun 2023 18:20:01 +0200 +Date | Tue, 27 Jun 2023 15:29:22 +0200 Path | `/home/jvandersaag/Documents/REMLA/project/model-training` Config | `.mllint.yml` Default | No Git: Remote URL | `https://github.com/remla23-team08/model-training.git` -Git: Commit | `f0c2bbadefd41a4d93dafe5edae6efbd8a25c6a2` -Git: Branch | `testing` +Git: Commit | `be98a5f0138ff205a06241261f33686bd37a8834` +Git: Branch | `fixture_fix` Git: Dirty Workspace? | Yes Number of Python files | 12 Lines of Python code | 286 @@ -102,7 +102,7 @@ This equates to **33.333333%** of Python files in your project being tests, whic #### Details — Project passes all of its automated tests — ✅ -Congratulations, all **7** tests in your project passed! +Congratulations, all **9** tests in your project passed! #### Details — Project provides a test coverage report — ❌ diff --git a/reports/tests-report.xml b/reports/tests-report.xml index 3c5fc9c..12d780c 100644 --- a/reports/tests-report.xml +++ b/reports/tests-report.xml @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/tests/conftest.py b/tests/conftest.py index b1d3a2d..06d5a6e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,8 +13,8 @@ root_path, dataset_path = get_paths() -@pytest.fixture(name="classifier") -def trained_model(): +@pytest.fixture(name="trained_model") +def trained_model_(): """Loads trained model""" classifier_path = os.path.join( root_path, "..", "data/models/c2_Classifier_Sentiment_Model" @@ -23,8 +23,8 @@ def trained_model(): yield classifier -@pytest.fixture(name="d_set") -def dataset(): +@pytest.fixture(name="dataset") +def dataset_(): """Loads dataset""" d_set = pd.read_csv( dataset_path, delimiter="\t", quoting=3, dtype={"Review": object, "Liked": int} @@ -32,16 +32,16 @@ def dataset(): yield d_set -@pytest.fixture(name="crps") -def corpus(): +@pytest.fixture(name="corpus") +def corpus_(): """Loads corpus""" crps_path = os.path.join(root_path, "..", "data/processed/corpus.joblib") crps = joblib.load(crps_path) yield crps -@pytest.fixture(name="cv") -def count_vectoriser(): +@pytest.fixture(name="count_vectoriser") +def count_vectoriser_(): """Loads count vectoriser""" cv = joblib.load( os.path.join(root_path, "..", "data", "models", "c1_BoW_Sentiment_Model.pkl") @@ -59,12 +59,12 @@ def test_data(): @pytest.fixture(name="X") -def X(crps, cv): +def X(corpus, count_vectoriser): """Loads full X features""" - return cv.transform(crps).toarray() + return count_vectoriser.transform(corpus).toarray() @pytest.fixture(name="y") -def y(d_set): +def y(dataset): """Loads full y class labels""" - return d_set.iloc[:, -1].values + return dataset.iloc[:, -1].values