Skip to content

Commit

Permalink
Fixing latent bug when fixed number of samples is agglomerated and --…
Browse files Browse the repository at this point in the history
…mlperf-bin-loader is used
  • Loading branch information
mnaumovfb committed Aug 31, 2020
1 parent 3f69366 commit cf0d0b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion recommendation/dlrm/pytorch/python/criteo.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ def load_query_samples(self, sample_list):
s = self.random_offsets[l]
e = self.random_offsets[l+1]

ls = [self.test_data[i] for i in range(s, e)]
if self.use_mlperf_bin_loader and self.samples_to_aggregate > 1:
ls = [self.test_data[l]]
else:
ls = [self.test_data[i] for i in range(s, e)]
if self.use_mlperf_bin_loader:
# NOTE: in binary dataset the values are transformed
ls_t = list(zip(*ls))
Expand Down
11 changes: 10 additions & 1 deletion v0.5/recommendation/python/backend_onnxruntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ def predict(self, batch_dense_X, batch_lS_o, batch_lS_i):
# print("onnx predict")
# print(self.inputs)
# print(self.outputs)


'''
incoming_bs = batch_dense_X.shape[0]
model_saved_bs = 2048
if (incoming_bs != model_saved_bs):
print("WARNING: mismatch beween incoming " + str(incoming_bs) + " and model saved " + str(model_saved_bs) + " mini-batch size")
fake_output = torch.zeros(size=(incoming_bs,1), dtype=torch.float32)
return fake_output
'''

dict_inputs = {}

# Dmitriy's approach to build dictionaries
Expand Down

0 comments on commit cf0d0b3

Please sign in to comment.