Skip to content

Commit 5748955

Browse files
committed
Fix ruff and mypy
1 parent b1a853b commit 5748955

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

notebooks/Efficiency Analysis.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"outputs": [],
113113
"source": [
114114
"# Load the jobs DataFrame from DuckDB\n",
115-
"preprocessed_jobs_df = ea.load_preprocessed_jobs_dataframe_from_duckdb(\n",
115+
"preprocessed_jobs_df = load_and_preprocess_jobs(\n",
116116
" db_path=\"../data/slurm_data.db\",\n",
117117
" table_name=\"Jobs\",\n",
118118
")\n",
@@ -608,7 +608,11 @@
608608
]
609609
}
610610
],
611-
"metadata": {},
611+
"metadata": {
612+
"language_info": {
613+
"name": "python"
614+
}
615+
},
612616
"nbformat": 4,
613617
"nbformat_minor": 5
614-
}
618+
}

src/analysis/efficiency_analysis.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@
44
The aim is to identify potential inefficiencies in GPU usage and notify users or PIs about these issues.
55
"""
66

7-
from pathlib import Path
87
from typing import cast
98

109
import numpy as np
1110
import pandas as pd
12-
import numpy as np
1311
from src.config.constants import DEFAULT_MIN_ELAPSED_SECONDS
1412
from src.config.enum_constants import FilterTypeEnum, MetricsDataFrameNameEnum
1513

16-
from src.database import DatabaseConnection
17-
from src.preprocess.preprocess import preprocess_data
18-
1914

2015
class EfficiencyAnalysis:
2116
"""

tests/test_preprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ def test_preprocess_timedelta_conversion(mock_data_path: str, mock_data_frame: p
359359
time_limit = data["TimeLimit"]
360360
assert time_limit.dtype == "timedelta64[ns]" # assert correct type
361361

362-
time_limit = time_limit.tolist()
362+
time_limit_list = time_limit.tolist()
363363
ground_truth_time_limit = ground_truth["TimeLimit"].tolist()
364-
for i, timedelta in enumerate(time_limit):
364+
for i, timedelta in enumerate(time_limit_list):
365365
assert timedelta.total_seconds() / 60 == ground_truth_time_limit[i]
366366

367367

0 commit comments

Comments
 (0)