Skip to content

Commit 9b45fd5

Browse files
committed
Cleanup nits.
1 parent be28303 commit 9b45fd5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/fray/src/fray/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ def submit(ctx, extra, cpus, memory, disk, tpu, gpu, gpu_count, env, auto_stop,
9393

9494
try:
9595
env_dict["GIT_COMMIT"] = subprocess.getoutput("git rev-parse HEAD")
96-
except Exception:
97-
pass
96+
except Exception as e:
97+
logger.warning(f"Failed to get git commit hash: {e}")
9898

9999
# Build device config
100100
device = CpuConfig()

lib/fray/src/fray/cluster/ray/tpu/execution.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,15 @@ def _hacky_remove_tpu_lockfile():
256256
try:
257257
os.unlink("/tmp/libtpu_lockfile")
258258
except FileNotFoundError:
259+
# The lockfile may not exist; this is expected and can be safely ignored.
259260
pass
260261
except PermissionError:
261262
logger.warning("Failed to remove lockfile")
262263
try:
263264
os.system("sudo rm /tmp/libtpu_lockfile")
264-
except Exception:
265-
pass
265+
except Exception as ex:
266+
# Unexpected error removing lockfile; log and continue.
267+
logger.warning(f"Unexpected error removing lockfile with sudo: {ex}")
266268

267269

268270
def _validate_num_slices(num_slices: int | Sequence[int]):
@@ -458,7 +460,6 @@ def _remove_members_from_actor_pool(self, desired_num_actors: int) -> None:
458460

459461
def _scale_actor_pool(self, desired_num_actors: int) -> None:
460462
# NOTE: There is no retry loop in this function.
461-
# You should wrap this in an external retry loop.
462463
if self._actor_pool:
463464
self._remove_unhealthy_members_from_actor_pool()
464465
if len(self._actor_pool) < desired_num_actors:

lib/marin/src/marin/evaluation/visualize.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ def target_fn(queue, args, kwargs):
6565
process.terminate()
6666
raise TimeoutError("Process timed out") from None
6767

68-
if success:
69-
return value
70-
else:
68+
if not success:
7169
value.reraise()
70+
return value
7271

7372

7473
@dataclass

0 commit comments

Comments
 (0)