Skip to content

Commit 7100c07

Browse files
committed
Clean up imports and remove unused imports in evaluation steps
Refactor import statements in eval_retrieval.py and eval_visualisation.py to: - Remove unused imports - Organize imports consistently - Simplify import statements
1 parent 969faa8 commit 7100c07

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

llm-complete-guide/steps/eval_retrieval.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
import json
1718
import logging
18-
from typing import Annotated, List, Tuple, Dict, Callable, Any, Optional
19-
from multiprocessing import Pool, cpu_count
2019
from functools import partial
21-
from tenacity import retry, stop_after_attempt, wait_exponential
22-
from tqdm import tqdm
23-
from concurrent.futures import ThreadPoolExecutor
24-
import json
20+
from multiprocessing import Pool, cpu_count
21+
from typing import Annotated, Any, Callable, Dict, List, Optional, Tuple
2522

2623
from datasets import load_dataset
24+
from tenacity import retry, stop_after_attempt, wait_exponential
2725
from utils.llm_utils import (
2826
find_vectorstore_name,
2927
get_db_conn,
@@ -32,7 +30,7 @@
3230
get_topn_similar_docs,
3331
rerank_documents,
3432
)
35-
from zenml import step, get_step_context
33+
from zenml import step
3634
from zenml.logger import get_logger
3735

3836
logger = get_logger(__name__)

llm-complete-guide/steps/eval_visualisation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import matplotlib.pyplot as plt
1919
import numpy as np
2020
from PIL import Image
21-
from zenml import ArtifactConfig, get_step_context, step, log_metadata
21+
from zenml import ArtifactConfig, get_step_context, log_metadata, step
2222

2323

2424
def create_image(

0 commit comments

Comments
 (0)