|
7 | 7 | import threading
|
8 | 8 | import time
|
9 | 9 | import uuid
|
10 |
| -import warnings |
11 | 10 | from collections.abc import Generator, Iterable, Iterator
|
12 | 11 | from datetime import datetime
|
13 | 12 | from queue import Full, Queue
|
@@ -268,7 +267,7 @@ def _to_pandas_ref(df: pd.DataFrame | ray.ObjectRef) -> ray.ObjectRef:
|
268 | 267 | elif isinstance(df, ray.ObjectRef):
|
269 | 268 | return df
|
270 | 269 | else:
|
271 |
| - raise ValueError("Expected a Ray object ref or a Pandas DataFrame, " f"got {type(df)}") |
| 270 | + raise ValueError(f"Expected a Ray object ref or a Pandas DataFrame, got {type(df)}") |
272 | 271 |
|
273 | 272 |
|
274 | 273 | class RayPartitionSet(PartitionSet[ray.ObjectRef]):
|
@@ -887,8 +886,7 @@ def _run_plan(
|
887 | 886 |
|
888 | 887 | start = datetime.now()
|
889 | 888 | profile_filename = (
|
890 |
| - f"profile_RayRunner.run()_" |
891 |
| - f"{datetime.replace(datetime.now(), second=0, microsecond=0).isoformat()[:-3]}.json" |
| 889 | + f"profile_RayRunner.run()_{datetime.replace(datetime.now(), second=0, microsecond=0).isoformat()[:-3]}.json" |
892 | 890 | )
|
893 | 891 |
|
894 | 892 | with profiler(profile_filename), ray_tracing.ray_tracer(result_uuid, daft_execution_config) as runner_tracer:
|
@@ -1234,16 +1232,11 @@ def __init__(
|
1234 | 1232 | address,
|
1235 | 1233 | )
|
1236 | 1234 | else:
|
1237 |
| - if address is not None: |
1238 |
| - if not address.endswith("10001"): |
1239 |
| - warnings.warn( |
1240 |
| - f"The address to a Ray client server is typically at port :10001, but instead we found: {address}" |
1241 |
| - ) |
1242 |
| - if not address.startswith("ray://"): |
1243 |
| - warnings.warn( |
1244 |
| - f"Expected Ray address to start with 'ray://' protocol but found: {address}. Automatically prefixing your address with the protocol to make a Ray connection: ray://{address}" |
1245 |
| - ) |
1246 |
| - address = "ray://" + address |
| 1235 | + if address is not None and address.startswith("ray://"): |
| 1236 | + logger.warning( |
| 1237 | + "Specifying a Ray address with the 'ray://' prefix uses the Ray Client, which may impact performance. If this is running in a Ray job, you may not need to specify the address at all." |
| 1238 | + ) |
| 1239 | + |
1247 | 1240 | ray.init(address=address)
|
1248 | 1241 |
|
1249 | 1242 | # Check if Ray is running in "client mode" (connected to a Ray cluster via a Ray client)
|
|
0 commit comments