Skip to content

Commit 29d5353

Browse files
authored
Typos Corrected (#10942)
1 parent 5472ae1 commit 29d5353

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

official/recommendation/movielens.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090

9191
def _download_and_clean(dataset, data_dir):
92-
"""Download MovieLens dataset in a standard format.
92+
"""Download the MovieLens dataset in a standard format.
9393
9494
This function downloads the specified MovieLens format and coerces it into a
9595
standard format. The only difference between the ml-1m and ml-20m datasets
@@ -148,10 +148,10 @@ def _transform_csv(input_path, output_path, names, skip_first, separator=","):
148148
149149
Args:
150150
input_path: The path of the raw csv.
151-
output_path: The path of the cleaned csv.
152-
names: The csv column names.
153-
skip_first: Boolean of whether to skip the first line of the raw csv.
154-
separator: Character used to separate fields in the raw csv.
151+
output_path: The location of the cleaned csv file.
152+
names: The names of the csv columns.
153+
skip_first: Boolean indicating whether the first line of the raw csv should be skipped.
154+
separator: A character used in raw csv to separate fields.
155155
"""
156156
if six.PY2:
157157
names = [six.ensure_text(n, "utf-8") for n in names]
@@ -179,17 +179,17 @@ def _regularize_1m_dataset(temp_dir):
179179
ratings.dat
180180
The file has no header row, and each line is in the following format:
181181
UserID::MovieID::Rating::Timestamp
182-
- UserIDs range from 1 and 6040
183-
- MovieIDs range from 1 and 3952
182+
- UserIDs range between 1 and 6040
183+
- MovieIDs can range between 1 and 3952
184184
- Ratings are made on a 5-star scale (whole-star ratings only)
185-
- Timestamp is represented in seconds since midnight Coordinated Universal
185+
- Timestamp is represented in seconds since midnight. Coordinated Universal
186186
Time (UTC) of January 1, 1970.
187187
- Each user has at least 20 ratings
188188
189189
movies.dat
190190
Each line has the following format:
191191
MovieID::Title::Genres
192-
- MovieIDs range from 1 and 3952
192+
- MovieIDs can range between 1 and 3952
193193
"""
194194
working_dir = os.path.join(temp_dir, ML_1M)
195195

@@ -223,7 +223,7 @@ def _regularize_20m_dataset(temp_dir):
223223
movies.csv
224224
Each line has the following format:
225225
MovieID,Title,Genres
226-
- MovieIDs range from 1 and 3952
226+
- MovieIDs can range between 1 and 3952
227227
"""
228228
working_dir = os.path.join(temp_dir, ML_20M)
229229

@@ -265,7 +265,7 @@ def csv_to_joint_dataframe(data_dir, dataset):
265265

266266

267267
def integerize_genres(dataframe):
268-
"""Replace genre string with a binary vector.
268+
"""Replace the genre string with a binary vector.
269269
270270
Args:
271271
dataframe: a pandas dataframe of movie data.
@@ -308,7 +308,7 @@ def define_data_download_flags():
308308

309309

310310
def main(_):
311-
"""Download and extract the data from GroupLens website."""
311+
"""Download and extract the data from the GroupLens website."""
312312
download(flags.FLAGS.dataset, flags.FLAGS.data_dir)
313313

314314

official/recommendation/ncf_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def define_ncf_flags():
191191
default=None,
192192
help=flags_core.help_wrap(
193193
"The batch size used for evaluation. This should generally be larger"
194-
"than the training batch size as the lack of back propagation during"
194+
"than the training batch size, as the lack of back propagation during"
195195
"evaluation can allow for larger batch sizes to fit in memory. If not"
196196
"specified, the training batch size (--batch_size) will be used."))
197197

@@ -257,7 +257,7 @@ def define_ncf_flags():
257257
"If passed, training will stop when the evaluation metric HR is "
258258
"greater than or equal to hr_threshold. For dataset ml-1m, the "
259259
"desired hr_threshold is 0.68 which is the result from the paper; "
260-
"For dataset ml-20m, the threshold can be set as 0.95 which is "
260+
"For the dataset ml-20m, the threshold can be set as 0.95 which is "
261261
"achieved by MLPerf implementation."))
262262

263263
flags.DEFINE_enum(
@@ -308,7 +308,7 @@ def define_ncf_flags():
308308
"If set, output the MLPerf compliance logging. This is only useful "
309309
"if one is running the model for MLPerf. See "
310310
"https://github.com/mlperf/policies/blob/master/training_rules.adoc"
311-
"#submission-compliance-logs for details. This uses sudo and so may "
311+
"#submission-compliance-logs for details. This uses sudo, and so it may "
312312
"ask for your password, as root access is needed to clear the system "
313313
"caches, which is required for MLPerf compliance."))
314314

0 commit comments

Comments
 (0)