Skip to content

Commit

Permalink
doc: update tfds docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
BillHuang2001 committed Apr 23, 2024
1 parent c94952e commit ad86d91
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/evox/problems/neuroevolution/supervised_learning/tfds.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ class TensorflowDataset(Problem):
"""Wrap a tensorflow dataset as a problem.
TensorFlow Datasets (TFDS) directly depends on the package `tensorflow-datasets` and `grain`.
Additionally, when downloading the dataset for the first time, it requires `tensorflow` to be installed.
Additionally, when downloading the dataset for the first time, it requires `tensorflow` to be installed and a active internet connection.
If you want to avoid installing `tensorflow`, you can prepare the dataset beforehand in another environment with `tensorflow` installed,
and then copy the dataset to `~/tensorflow_datasets`. `~/` means the home directory of the user.
run:
.. code-block:: python
import tensorflow_datasets as tfds
tfds.data_source(self.dataset)
and then copy the dataset to the target machine.
The default location is`~/tensorflow_datasets`. `~/` means the home directory of the user.
Please notice that the data is loaded under JAX's jit context, so the data should be valid JAX data type,
namely JAX or Numpy arrays, or Python's int, float, list, and dict.
Expand Down

0 comments on commit ad86d91

Please sign in to comment.