Created
March 23, 2021 22:21
-
-
Save zilunpeng/8aea95fea9536814670fe69edde79337 to your computer and use it in GitHub Desktop.
Process every data sample using Ray. 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
prediction_futures, ground_truths = [], [] | |
for i, batch in enumerate(data_loader): | |
prediction_future = remote_process_batch_element.remote(batch, model_id, decoder_id, target_dict) | |
prediction_futures.append(prediction_future) | |
ground_truths.append(batch[2][0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment