diff --git a/CHANGELOG.md b/CHANGELOG.md index a5ed38ec7..8b81931a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ Note that Sockeye has checks in place to not translate with an old model that wa Each version section may have subsections for: _Added_, _Changed_, _Removed_, _Deprecated_, and _Fixed_. +## [3.0.15] + +### Fixed +- Fixed GPU-based scoring by copying to cpu tensor first before converting to numpy. + ## [3.0.14] ### Added diff --git a/sockeye/__init__.py b/sockeye/__init__.py index 6a1f3e85a..7fd0892c2 100644 --- a/sockeye/__init__.py +++ b/sockeye/__init__.py @@ -11,4 +11,4 @@ # express or implied. See the License for the specific language governing # permissions and limitations under the License. -__version__ = '3.0.14' +__version__ = '3.0.15' diff --git a/sockeye/scoring_pt.py b/sockeye/scoring_pt.py index 082ec02a7..d66b17682 100644 --- a/sockeye/scoring_pt.py +++ b/sockeye/scoring_pt.py @@ -144,7 +144,7 @@ def score_batch(self, batch: data_io_pt.Batch): self.traced_batch_scorer = pt.jit.trace(self.batch_scorer, scorer_inputs, strict=False) scores = self.traced_batch_scorer(*scorer_inputs) # (batch, num_target_factors) - return scores.numpy() + return scores.cpu().numpy() @pt.inference_mode(True) def score(self, score_iter: data_io_pt.BaseParallelSampleIter, output_handler: OutputHandler):