Skip to content

Commit

Permalink
Rename options to make the intent clear
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinds committed Oct 3, 2023
1 parent f41cf96 commit ffd6eb2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nobrainer/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def from_tfrecords(
block_shape=None,
scalar_labels=False,
n_classes=1,
options=None,
tf_dataset_options=None,
num_parallel_calls=1,
):
"""Function to retrieve a saved tf record as a nobrainer Dataset
Expand All @@ -98,8 +98,8 @@ def from_tfrecords(
compressed = _is_gzipped(files[0], filesys=fs)
dataset = tf.data.Dataset.list_files(file_pattern, shuffle=False)

if options:
dataset = dataset.with_options(options)
if tf_dataset_options:
dataset = dataset.with_options(tf_dataset_options)

# Read each of these files as a TFRecordDataset.
# Assume all files have same compression type as the first file.
Expand Down Expand Up @@ -154,7 +154,7 @@ def from_files(
eval_size=0.1,
n_classes=1,
block_shape=None,
options=None,
tf_dataset_options=None,
):
"""Create Nobrainer datasets from data
filepaths: List(str), list of paths to individual input data files.
Expand Down Expand Up @@ -216,7 +216,7 @@ def from_files(
scalar_labels=scalar_labels,
n_classes=n_classes,
block_shape=block_shape,
options=options,
tf_dataset_options=tf_dataset_options,
num_parallel_calls=num_parallel_calls,
)
ds_eval = None
Expand All @@ -229,7 +229,7 @@ def from_files(
scalar_labels=scalar_labels,
n_classes=n_classes,
block_shape=block_shape,
options=options,
tf_dataset_options=tf_dataset_options,
num_parallel_calls=num_parallel_calls,
)
return ds_train, ds_eval
Expand Down

0 comments on commit ffd6eb2

Please sign in to comment.