-
Notifications
You must be signed in to change notification settings - Fork 702
Minor improvements of lm1b_nnx example #4745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -48,9 +48,11 @@ 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[4] | |||
try: | |||
flax_root_dir = pathlib.Path(__file__).parents[4] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If __file__
is /flax/examples/lm1b_nnx
then parents[4] raises IndexError
@@ -34,7 +34,7 @@ | |||
'File path to the training hyperparameter configuration.', | |||
lock_config=True, | |||
) | |||
flags.mark_flags_as_required(['config', 'workdir']) | |||
flags.mark_flags_as_required(['workdir']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a warning saying that config flag has a default value so it can't be strictly required.
1e1980a
to
c00f173
Compare
@@ -75,9 +75,9 @@ tensorboard --logdir=$HOME/logs | |||
You should expect to get numbers similar to these: | |||
|
|||
|
|||
Hardware | config | Training time | Loss | TensorBoard.dev | Workdir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed tensorboard.dev link as not usable
16677b3
to
84d82fb
Compare
Thanks @vfdev-5 ! |
84d82fb
to
92caa5f
Compare
92caa5f
to
7def227
Compare
Description
from flax import linen as nn
and usage of linenTraining logs on 2 GPUs: https://gist.github.com/vfdev-5/f75a2e32d231d892a6eee6cb1a451aa5