From 61bbe3f01158e714d392faf8c3920531e528b364 Mon Sep 17 00:00:00 2001 From: $aTyam Date: Sat, 16 Dec 2023 12:56:52 -0500 Subject: [PATCH] Minor Fixes Fixing circular import --- emission/analysis/modelling/trip_model/models.py | 4 ++-- emission/tests/modellingTests/TestForestModelLoadandSave.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/emission/analysis/modelling/trip_model/models.py b/emission/analysis/modelling/trip_model/models.py index e5fc08b46..1cb6de655 100644 --- a/emission/analysis/modelling/trip_model/models.py +++ b/emission/analysis/modelling/trip_model/models.py @@ -19,7 +19,7 @@ from emission.analysis.modelling.trip_model.clustering import get_distance_matrix, single_cluster_purity import emission.analysis.modelling.trip_model.data_wrangling as eamtd import emission.storage.decorations.trip_queries as esdtq -from emission.analysis.classification.inference.labels.inferrers import predict_cluster_confidence_discounting +import emission.analysis.classification.inference.labels.inferrers as eacili import emission.core.wrapper.entry as ecwe import emission.analysis.modelling.trip_model.greedy_similarity_binning as eamtg import emission.core.common as ecc @@ -738,7 +738,7 @@ def predict_proba(self, test_df): replaced_distribs = [] for trip in test_trips: - trip_prediction = predict_cluster_confidence_discounting(trip) + trip_prediction = eacili.predict_cluster_confidence_discounting(trip) if len(trip_prediction) == 0: # model could not find cluster for the trip diff --git a/emission/tests/modellingTests/TestForestModelLoadandSave.py b/emission/tests/modellingTests/TestForestModelLoadandSave.py index dddbb160c..e7d5491b9 100644 --- a/emission/tests/modellingTests/TestForestModelLoadandSave.py +++ b/emission/tests/modellingTests/TestForestModelLoadandSave.py @@ -1,7 +1,6 @@ from typing import ByteString import unittest import logging -import pytest from unittest.mock import patch import emission.analysis.modelling.trip_model.run_model as eamur import emission.analysis.modelling.trip_model.model_type as eamumt