Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent fa84c1c commit d3a9c82
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/decisionengine_modules/AWS/transforms/AwsBurnRate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def __init__(self, config):
super().__init__(config)

def transform(self, data_block):

spot_prices = self.provisioner_resource_spot_prices(data_block).fillna(0)
occupancy = self.AWS_Occupancy(data_block).fillna(0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def __init__(self, config):
super().__init__(config)

def transform(self, data_block):

self.logger.debug("in GceFigureOfMerit transform")
performance = self.GCE_Instance_Performance(data_block)
performance["PricePerformance"] = np.where(
Expand Down
1 change: 0 additions & 1 deletion src/decisionengine_modules/glideinwms/classads.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class GlideClientClassad(classadSupport.Classad):

# Class variable: Counter for classad counter.
# key = (name)
classad_counter = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def get_arg_parser():
############################################################

if __name__ == "__main__":

noroot_msg = "NOTE: Executing this command as user root is not allowed. Use the decisionengine user instead."

if os.geteuid() == 0:
Expand Down
13 changes: 5 additions & 8 deletions src/decisionengine_modules/glideinwms/glide_frontend_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ def create_glideclient_classads(
entry_name="condor",
glidein_site="Unknown",
):

if glidein_params is None:
glidein_params = {}
if glidein_monitors is None:
Expand Down Expand Up @@ -665,7 +664,7 @@ def create_glideclientglobal_classads(self, glidefactory_classad, key_builder):
}
for cred in credentials:
if cred.advertize:
for (fname, data) in cred.loaded_data:
for fname, data in cred.loaded_data:
classad_attrs_to_encrypt[cred.file_id(fname)] = data
if hasattr(cred, "security_class"):
# Convert security_class to string for factory
Expand Down Expand Up @@ -941,7 +940,7 @@ def count_match(self, job_types, job_type, entries):
# Get group of jobs based on request cpus
job_groups = jobs.groupby("RequestCpus")

for (req_cpus, group) in job_groups:
for req_cpus, group in job_groups:
# Group jobs by matching criteria: RequestCpus for now
# We care about job counts for each group
job_count = len(group)
Expand Down Expand Up @@ -1065,7 +1064,6 @@ def identify_limits_triggered(
global_total_idle_glideins,
limits_triggered,
):

# Identify the limits triggered for advertising in glideresource
if count_status["Total"] >= self.entry_max_glideins: # max_running
limits_triggered[
Expand Down Expand Up @@ -1123,7 +1121,6 @@ def compute_glidein_min_idle(
or (global_total_glideins >= self.global_total_max_slots)
or (global_total_idle_glideins >= self.global_total_max_slots_idle)
):

# Do not request more glideins under following conditions:
# 1. Have all the running jobs I wanted
# 2. Have enough idle vms/slots
Expand Down Expand Up @@ -1799,7 +1796,7 @@ def count_match_fom_bff(self, job_types, job_type, entries):

dbg_info.append(f"{len(job_groups)} job groups")

for (req_cpus, job_group) in job_groups:
for req_cpus, job_group in job_groups:
# Group jobs by matching criteria: RequestCpus for now
# We only care about job counts for each group
job_count = len(job_group)
Expand Down Expand Up @@ -1903,7 +1900,7 @@ def count_match_fom_dff(self, job_types, job_type, entries):
# Get group of jobs based on request cpus
job_groups = jobs.groupby("RequestCpus")

for (req_cpus, job_group) in job_groups:
for req_cpus, job_group in job_groups:
# Group jobs by matching criteria: RequestCpus for now
# We care about job counts for each group
job_count = len(job_group)
Expand Down Expand Up @@ -1940,7 +1937,7 @@ def count_match_fom_dff(self, job_types, job_type, entries):
# Start with entries with lowest FOM and fill them first
job_count_matched = 0

for (_fom, fom_group_entries) in fom_matches:
for _fom, fom_group_entries in fom_matches:
job_count_unmatched = job_count - job_count_matched
if job_count_unmatched > 0:
# Distribute the jobs equally among this entry group
Expand Down
1 change: 0 additions & 1 deletion src/decisionengine_modules/glideinwms/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def __str__(self):


class CredentialCache:

# Cache the credential ids so we do not create again unless required
# Specially expensive to create id for proxy which uses DN in hash
def __init__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def __init__(self, config):
super().__init__(config)

def transform(self, datablock):

# Get the dataframe containing AWS entries
self.logger.debug("in AWSFactoryEntryData transform")
aws_entries = self.Factory_Entries(datablock).xs("AWS")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def __init__(self, config):
)

def transform(self, datablock):

self.logger.info("*** Starting job clustering ***")
# TODO not sure if metadata is propagated or if this is the right attrs to id a datablock

Expand Down

0 comments on commit d3a9c82

Please sign in to comment.