Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/imagenet/train_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_train_and_evaluate(self, model):
workdir = tempfile.mkdtemp()

# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + '/.tfds/metadata'

# Define training configuration
Expand Down
2 changes: 1 addition & 1 deletion examples/lm1b/input_pipeline_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _get_datasets(self):
vocab_path = os.path.join(tempfile.mkdtemp(), 'sentencepiece_model')

# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + '/.tfds/metadata' # pylint: disable=unused-variable

with tfds.testing.mock_data(num_examples=128, data_dir=data_dir):
Expand Down
2 changes: 1 addition & 1 deletion examples/lm1b/train_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_train_and_evaluate(self):
workdir = tempfile.mkdtemp()

# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + '/.tfds/metadata' # pylint: disable=unused-variable

with tfds.testing.mock_data(num_examples=128, data_dir=data_dir):
Expand Down
2 changes: 1 addition & 1 deletion examples/mnist/train_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_train_and_evaluate(self):
workdir = tempfile.mkdtemp()

# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + "/.tfds/metadata" # pylint: disable=unused-variable

# Define training configuration.
Expand Down
2 changes: 1 addition & 1 deletion examples/ogbg_molpcba/train_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def test_train_and_evaluate(self):
workdir = tempfile.mkdtemp()

# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + '/.tfds/metadata' # pylint: disable=unused-variable

# Get the test configuration.
Expand Down
2 changes: 1 addition & 1 deletion examples/sst2/input_pipeline_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _get_vocab_path(self):
def _get_dataset(self, vocab_path):
"""Uses mock data to create the dataset."""
# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + '/.tfds/metadata' # pylint: disable=unused-variable
with tfds.testing.mock_data(num_examples=128, data_dir=data_dir):
return input_pipeline.TextDataset(vocab_path=vocab_path, split='train')
Expand Down
2 changes: 1 addition & 1 deletion examples/wmt/input_pipeline_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _get_datasets(self):
vocab_path = os.path.join(tempfile.mkdtemp(), 'sentencepiece_model')

# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + '/.tfds/metadata' # pylint: disable=unused-variable

with tfds.testing.mock_data(num_examples=128, data_dir=data_dir):
Expand Down
2 changes: 1 addition & 1 deletion examples/wmt/train_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_train_and_evaluate(self):
workdir = tempfile.mkdtemp()

# Go two directories up to the root of the flax directory.
flax_root_dir = pathlib.Path(__file__).parents[2]
flax_root_dir = pathlib.Path(__file__).absolute().parents[2]
data_dir = str(flax_root_dir) + '/.tfds/metadata' # pylint: disable=unused-variable

with tfds.testing.mock_data(num_examples=128, data_dir=data_dir):
Expand Down
Loading