Skip to content

Commit

Permalink
Fix a column name
Browse files Browse the repository at this point in the history
  • Loading branch information
notoraptor committed Sep 9, 2024
1 parent 55f7c48 commit 5c400d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sarc/alerts/usage_alerts/cluster_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def check_nb_jobs_per_cluster_per_time(
f_nb_clusters_per_timestamp = pandas.DataFrame(
{
"timestamp": timestamps,
"cluster_name": [len(cluster_names)] * len(timestamps),
"nb_all_clusters": [len(cluster_names)] * len(timestamps),
}
)
# Generate a dataframe associating each timestamp to number of jobs which run at this timestamp.
Expand All @@ -74,7 +74,7 @@ def check_nb_jobs_per_cluster_per_time(
f_nb_jobs_per_timestamp, on="timestamp", how="left"
)
# Compute cluster usage: number of jobs per cluster per timestamp
f_stats["jobs_per_cluster"] = f_stats["job_id"] / f_stats["cluster_name"]
f_stats["jobs_per_cluster"] = f_stats["job_id"] / f_stats["nb_all_clusters"]
# Compute average cluster usage
avg = f_stats["jobs_per_cluster"].mean()
# Compute standard deviation for cluster usage
Expand Down

0 comments on commit 5c400d4

Please sign in to comment.