Conversation
…strap functionality - Added `unregister_named_actor` method in `GossipCluster` to handle actor deregistration more effectively. - Introduced `bootstrap` function for automatic cluster formation in Ray and torchrun environments, simplifying integration. - Updated CLI to support parameter separation using `--`, allowing for clearer distinction between actor-level options and constructor arguments. - Enhanced documentation across multiple files to reflect new features and usage patterns, improving clarity for users. - Refactored examples to demonstrate the new command-line argument structure and bootstrap functionality.
- Updated the `members` and `all_named_actors` methods in `PyActorSystem` to utilize `PyList` and `PyDict` for improved Python object handling and JSON serialization. - Enhanced the structure of returned data for both methods, ensuring better compatibility with Python and clearer representation of actor attributes. - Changed the default `scheduler_type` in the `Router` class from `stream_load` to `round_robin`, aligning with expected behavior for task scheduling.
…ation - Updated `actor_loader.py` to support loading both Actor and @Remote classes, enhancing flexibility in actor management. - Modified `actors.py` to differentiate between remote and Actor class instantiation, improving error handling and user feedback. - Refactored `Router` and `VllmWorker` classes to use the @Remote decorator, streamlining method exposure and enhancing clarity in the API. - Improved documentation across multiple files, including method descriptions and usage examples, to facilitate better understanding for users. - Enhanced error handling in `VllmWorker` and `TransformersWorker` to provide clearer feedback on operational issues and improve robustness.
|
|
||
| system = await init(addr=addr, seeds=seeds if seeds else None) | ||
| try: | ||
| proxy = await actor_class.spawn( |
Check notice
Code scanning / CodeQL
Unused local variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 22 hours ago
In general, to fix an unused local variable, either remove the variable (and possibly keep only the expression if it has side effects) or rename it to something like _/unused_* if it is intentionally unused for documentation or interface reasons.
Here, the call to actor_class.spawn must still happen (it starts the remote actor), but there is no need to bind its result to proxy. The best fix, without changing behavior, is to drop the proxy = assignment and simply await actor_class.spawn(...). This keeps all side effects intact and removes the unused local variable.
Concretely, in python/pulsing/cli/actors.py, inside start_generic_actor’s inner run function, replace the proxy = await actor_class.spawn(...) call (lines 122–126) with await actor_class.spawn(...) using the same arguments. No imports or other definitions need to change.
| @@ -119,7 +119,7 @@ | ||
|
|
||
| system = await init(addr=addr, seeds=seeds if seeds else None) | ||
| try: | ||
| proxy = await actor_class.spawn( | ||
| await actor_class.spawn( | ||
| name=name, | ||
| public=True, | ||
| **constructor_kwargs, |
Overview:
Details:
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)