question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[workflow] create a virtual actor from a virtual actor

See original GitHub issue

When one virtual actor is created, sometimes the user want to duplicate the virtual actor like fork. One way to do this is to get the content of the virtual actor and create another virtual actor. But there is one limitation for this way since sometimes the user doesn’t have the code.

Another and more efficient way to do this is to copy from storage. Here I propose the following API:

@PublicAPI(stability="beta")
def get_actor(actor_id: str, create_from:Optional[str]=None ) -> "VirtualActor":

workflow.get_actor(actor_id="xxx", from_actor_id="yyy")

so this will create a virtual actor xxx from virtual actor yyy. It xxx has already been created, it’ll just return.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
iychengcommented, Nov 18, 2021

@iycheng In the following code segment, would the estimator inside new_va be a different object from the estimator inside old_va? Or new_va and old_va might still share the same estimator object?

@ray.workflow.virtual_actor
class MLNode():
    def __init__(self, estimator: BaseEstimator):
        if estimator is not None:
            self.estimator = estimator

    @workflow.virtual_actor.readonly
    def get_model(self):
        return self.estimator

    def __getstate__(self):
        return self.estimator

    def __setstate__(self, estimator):
        self.estimator = estimator

logistic = LogisticRegression(max_iter=10000, tol=0.1)
old_va = MLNode.get_or_create('old_va_name', logistic)
new_va = workflow.get_or_create('new_va_name', 'old_va_name')

They will be different, even in the storage layer.

you should treat them as a different virtual actor.

1reaction
lchu-ibmcommented, Nov 18, 2021

@iycheng sure, I can look into the namespace feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How-to: Use virtual actors in Dapr | Dapr Docs
Actors can schedule periodic work on themselves by registering either timers or reminders. The functionality of timers and reminders is very ...
Read more >
virtual-actors · GitHub Topics
Orbit - Virtual actor framework for building distributed systems ... Activities workflows) over Microsoft Orleans framework, providing stable, long-running, ...
Read more >
ray.workflow.virtual_actor_class — Ray 1.11.0
Source code for ray.workflow.virtual_actor_class ... __dict__) except TypeError as e: raise ValueError("The virtual actor contains fields that can't be ...
Read more >
Virtual Camera Actor Quick Start - Unreal Engine Documentation
Starts the Virtual Camera where the actor is located within the scene and creates a home icon on the map. Rack Focus Speed....
Read more >
Virtual Camera workflows | Live Capture | 1.0.1 - Unity - Manual
Add a Virtual Camera Actor by going to Menu > GameObject > Create > Live Capture > Camera > Virtual Camera Actor.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found