Skip to content

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

@HairlessVillager

Description

@HairlessVillager

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.😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions