Skip to content

Commit

Permalink
fixes in folders other than main 'python' package
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Keller <[email protected]>
  • Loading branch information
bluenote10 committed Dec 1, 2024
1 parent 6c80ff0 commit ee9f0c7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ci/lint/clang-tidy-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def main():
filename = None
lines_by_file = {}
for line in sys.stdin:
match = re.search('^\+\+\+\ "?(.*?/){%s}([^ \t\n"]*)' % args.p, line)
match = re.search(r'^\+\+\+\ "?(.*?/){%s}([^ \t\n"]*)' % args.p, line)
if match:
filename = match.group(2)
if filename is None:
Expand All @@ -215,7 +215,7 @@ def main():
if not re.match("^%s$" % args.iregex, filename, re.IGNORECASE):
continue

match = re.search("^@@.*\+(\d+)(,(\d+))?", line)
match = re.search(r"^@@.*\+(\d+)(,(\d+))?", line)
if match:
start_line = int(match.group(1))
line_count = 1
Expand Down
2 changes: 1 addition & 1 deletion ci/pipeline/determine_tests_to_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def get_commit_range():
RAY_CI_JAVA_AFFECTED = 1
if (
changed_file.startswith("python/setup.py")
or re.match(".*requirements.*\.txt", changed_file)
or re.match(r".*requirements.*\.txt", changed_file)
or changed_file == "python/requirements_compiled.txt"
):
RAY_CI_PYTHON_DEPENDENCIES_AFFECTED = 1
Expand Down
4 changes: 2 additions & 2 deletions release/air_tests/air_benchmarks/mlperf-train/metric_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ def get_ray_spilled_and_restored_mb():

summary_str = internal_api.memory_summary(stats_only=True)

match = re.search("Spilled (\d+) MiB", summary_str)
match = re.search(r"Spilled (\d+) MiB", summary_str)
spilled_mb = int(match.group(1)) if match else 0

match = re.search("Restored (\d+) MiB", summary_str)
match = re.search(r"Restored (\d+) MiB", summary_str)
restored_mb = int(match.group(1)) if match else 0

return spilled_mb, restored_mb
Expand Down
2 changes: 1 addition & 1 deletion release/k8s_tests/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from ray.serve.drivers import DAGDriver
from ray.dag.input_node import InputNode

"""
r"""
We are building a DAG like this:
A -> B ----> C
\-> D --/
Expand Down
2 changes: 1 addition & 1 deletion release/util/get_contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def run(access_token, prev_release_commit, curr_release_commit):
(
f"git log {prev_release_commit}..{curr_release_commit} "
f'--pretty=format:"%s" '
f' | grep -Eo "#(\d+)"'
fr' | grep -Eo "#(\d+)"'
)
)
joined = " && ".join(cmd)
Expand Down
2 changes: 1 addition & 1 deletion rllib/algorithms/impala/torch/vtrace_torch_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def vtrace_torch(
clip_rho_threshold: Union[float, "torch.Tensor"] = 1.0,
clip_pg_rho_threshold: Union[float, "torch.Tensor"] = 1.0,
):
"""V-trace for softmax policies implemented with torch.
r"""V-trace for softmax policies implemented with torch.
Calculates V-trace actor critic targets for softmax polices as described in
"IMPALA: Scalable Distributed Deep-RL with Importance Weighted Actor-Learner
Expand Down
2 changes: 1 addition & 1 deletion rllib/core/learner/learner_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ def foreach_learner(
mark_healthy: bool = True,
**kwargs,
) -> RemoteCallResults:
"""Calls the given function on each Learner L with the args: (L, \*\*kwargs).
r"""Calls the given function on each Learner L with the args: (L, \*\*kwargs).
Args:
func: The function to call on each Learner L with args: (L, \*\*kwargs).
Expand Down
2 changes: 1 addition & 1 deletion rllib/models/tf/tf_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def rsample(

@DeveloperAPI
class TfCategorical(TfDistribution):
"""Wrapper class for Categorical distribution.
r"""Wrapper class for Categorical distribution.
Creates a categorical distribution parameterized by either :attr:`probs` or
:attr:`logits` (but not both).
Expand Down
2 changes: 1 addition & 1 deletion rllib/models/torch/torch_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def rsample(

@DeveloperAPI
class TorchCategorical(TorchDistribution):
"""Wrapper class for PyTorch Categorical distribution.
r"""Wrapper class for PyTorch Categorical distribution.
Creates a categorical distribution parameterized by either :attr:`probs` or
:attr:`logits` (but not both).
Expand Down
2 changes: 1 addition & 1 deletion rllib/offline/estimators/doubly_robust.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

@DeveloperAPI
class DoublyRobust(OffPolicyEstimator):
"""The Doubly Robust estimator.
r"""The Doubly Robust estimator.
Let s_t, a_t, and r_t be the state, action, and reward at timestep t.
Expand Down

0 comments on commit ee9f0c7

Please sign in to comment.