Created
March 23, 2021 22:18
-
-
Save zilunpeng/c8a55ccdb8df133a2101c08b04ed5151 to your computer and use it in GitHub Desktop.
Define the Ray remote method for processing data sample. Code below is part of the distributed inference notebook (https://git.io/JYeQQ).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ray.remote | |
def remote_process_data_sample(batch, model, generator, target_dict): | |
result = process_data_sample(batch, model, generator, target_dict) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment