Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to operate a remote object? #567

Open
HairlessVillager opened this issue Dec 5, 2024 · 0 comments
Open

[Question] How to operate a remote object? #567

HairlessVillager opened this issue Dec 5, 2024 · 0 comments

Comments

@HairlessVillager
Copy link

Hi everyone. I'm new to here. I'm developing a framework about computation offloading, which offloads computation-intensive tasks to remote machines.

I want to write a class decorator, which wrap a class to a new class. It acts like the original class but all computation occurs on a remote machine. For example:

class Model:
    def inference(self, x):
        ...

RemoteModel = remote_class_wrapper(Model)
inst = Model()
remote_inst = RemoteModel()
x = inst.inference(123)
y = remote_inst.inference(123)
assert x == y

So my questions are:

  • Am I reinventing the wheel?
  • Is there room for improvement in my implementation method?
  • Do you have any other comments or suggestions?

I'm looking forward to your replies.😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant