Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cloud Language modeling] benchmark.py has to be executed with python3 and not python2 #28

Closed
francois-wellenreiter opened this issue Jan 7, 2019 · 2 comments

Comments

@francois-wellenreiter
Copy link

in the file https://github.com/mlperf/inference/blob/master/cloud/language_modeling/README it is specified to start benchmark.py with python, but urllib.request does not work. It only exists with python3.

@francois-wellenreiter
Copy link
Author

by the way, this patch has to be applied

diff --git a/cloud/language_modeling/benchmark.py b/cloud/language_modeling/benchmark.py
index 814f9f7..022f941 100644
--- a/cloud/language_modeling/benchmark.py
+++ b/cloud/language_modeling/benchmark.py
@@ -229,7 +229,7 @@ def loadValidationDataset(arguments):
dataset = Dataset(vocab, int(arguments["words_per_sample"]), int(arguments["maximum_samples"]),
int(arguments["mini_batch_size"]))

  • with open(path, "r") as datasetFile:
  • with open(path, "r" , encoding="utf-8") as datasetFile:
    for line in datasetFile:
    for word in line.split():
    dataset.addWord(word)

profvjreddi added a commit that referenced this issue Mar 27, 2019
language_modeling issue #28 fix and Docker support
@christ1ne
Copy link
Contributor

closing & the issue seems to be addressed. Please re-open if the fix is not right.

arjunsuresh pushed a commit to GATEOverflow/inference that referenced this issue Apr 29, 2024
language_modeling issue mlcommons#28 fix and Docker support

Former-commit-id: 3e4ae7b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants