diff --git a/README.md b/README.md index 2aee2e2..6055806 100644 --- a/README.md +++ b/README.md @@ -294,8 +294,8 @@ This is still in dev, works great but roughness is expected, and contributions a - Make your changes without changing the design patterns. - Write tests for your changes if necessary. -- Install locally with `pip install -e .`. -- Run tests with `python -m unittest discover -s tests`. +- Install locally with `pip3 install -e .`. +- Run tests with `python3 -m unittest discover -s tests`. - Then submit a pull request. Contributions can be made in various forms: diff --git a/nanodl/__src/utils/data.py b/nanodl/__src/utils/data.py index 6e4746b..ece3683 100644 --- a/nanodl/__src/utils/data.py +++ b/nanodl/__src/utils/data.py @@ -110,7 +110,7 @@ def __init__( self.shuffle = shuffle self.drop_last = drop_last - self.keys = __PRNGSequence(seed=Config.default().global_seed) + self.keys = _PRNGSequence(seed=Config.default().global_seed) self.data_len = len(dataset) # Length of the dataset self.indices = jnp.arange(self.data_len) # available indices in the dataset self.pose = 0 # record the current position in the dataset @@ -162,7 +162,7 @@ def default(cls): return cls(rng_reserve_size=1, global_seed=42) -class __PRNGSequence(Iterator[jax.random.PRNGKey]): +class _PRNGSequence(Iterator[jax.random.PRNGKey]): """ An Iterator of Jax PRNGKey (minimal version of `haiku.PRNGSequence`).