mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 01:41:58 +08:00
Fix python linting (#2076)
This commit is contained in:
committed by
Robert Nishihara
parent
88fa98e851
commit
bea97b425b
@@ -76,10 +76,9 @@ def tsqr(a):
|
||||
lower = [a.shape[1], 0]
|
||||
upper = [2 * a.shape[1], core.BLOCK_SIZE]
|
||||
ith_index //= 2
|
||||
q_block_current = ra.dot.remote(q_block_current,
|
||||
ra.subarray.remote(
|
||||
q_tree[ith_index, j], lower,
|
||||
upper))
|
||||
q_block_current = ra.dot.remote(
|
||||
q_block_current,
|
||||
ra.subarray.remote(q_tree[ith_index, j], lower, upper))
|
||||
q_result.objectids[i] = q_block_current
|
||||
r = current_rs[0]
|
||||
return q_result, ray.get(r)
|
||||
@@ -222,10 +221,10 @@ def qr(a):
|
||||
y_col_block = core.subblocks.remote(y_res, [], [i])
|
||||
q = core.subtract.remote(
|
||||
q,
|
||||
core.dot.remote(y_col_block,
|
||||
core.dot.remote(
|
||||
Ts[i],
|
||||
core.dot.remote(
|
||||
core.transpose.remote(y_col_block), q))))
|
||||
core.dot.remote(
|
||||
y_col_block,
|
||||
core.dot.remote(
|
||||
Ts[i],
|
||||
core.dot.remote(core.transpose.remote(y_col_block), q))))
|
||||
|
||||
return ray.get(q), r_res
|
||||
|
||||
@@ -749,8 +749,8 @@ class GlobalState(object):
|
||||
"name":
|
||||
"SubmitTask",
|
||||
"args": {},
|
||||
"id": (parent_info["worker_id"] +
|
||||
str(micros(min(parent_times))))
|
||||
"id": (parent_info["worker_id"] + str(
|
||||
micros(min(parent_times))))
|
||||
}
|
||||
full_trace.append(parent)
|
||||
|
||||
@@ -824,8 +824,8 @@ class GlobalState(object):
|
||||
"name":
|
||||
"SubmitTask",
|
||||
"args": {},
|
||||
"id": (parent_info["worker_id"] +
|
||||
str(micros(min(parent_times))))
|
||||
"id": (parent_info["worker_id"] + str(
|
||||
micros(min(parent_times))))
|
||||
}
|
||||
full_trace.append(parent)
|
||||
|
||||
|
||||
@@ -451,8 +451,8 @@ def task_completion_time_distribution():
|
||||
# Create the distribution to plot
|
||||
distr = []
|
||||
for task_id, data in tasks.items():
|
||||
distr.append(
|
||||
data["store_outputs_end"] - data["get_arguments_start"])
|
||||
distr.append(data["store_outputs_end"] -
|
||||
data["get_arguments_start"])
|
||||
|
||||
# Create a histogram from the distribution
|
||||
top, bin_edges = np.histogram(distr, bins="auto")
|
||||
@@ -520,10 +520,10 @@ def compute_utilizations(abs_earliest,
|
||||
# Walk over each time bucket that this task intersects, adding the
|
||||
# amount of time that the task intersects within each bucket
|
||||
for bucket_idx in range(start_bucket, end_bucket + 1):
|
||||
bucket_start_time = ((
|
||||
earliest_time + bucket_idx) * bucket_time_length)
|
||||
bucket_end_time = ((earliest_time +
|
||||
(bucket_idx + 1)) * bucket_time_length)
|
||||
bucket_start_time = (
|
||||
(earliest_time + bucket_idx) * bucket_time_length)
|
||||
bucket_end_time = (
|
||||
(earliest_time + (bucket_idx + 1)) * bucket_time_length)
|
||||
|
||||
task_start_time_within_bucket = max(task_start_time,
|
||||
bucket_start_time)
|
||||
|
||||
Reference in New Issue
Block a user