-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Train] Improve PyTorch Fashion MNIST Example #38237
[Train] Improve PyTorch Fashion MNIST Example #38237
Conversation
python/ray/train/examples/pytorch/torch_fashion_mnist_example.py
Outdated
Show resolved
Hide resolved
# Initialize a Ray TorchTrainer | ||
trainer = TorchTrainer( | ||
train_loop_per_worker=train_func, | ||
train_loop_config={"lr": 1e-3, "batch_size": 64, "epochs": 4}, | ||
scaling_config=ScalingConfig(num_workers=num_workers, use_gpu=use_gpu), | ||
train_loop_per_worker=train_func_per_worker, | ||
train_loop_config=train_config, | ||
scaling_config=scaling_config, | ||
) | ||
result = trainer.fit() |
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.
Thoughts on adding a # [4]
for this step?
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com>
python/ray/train/examples/pytorch/torch_fashion_mnist_example.py
Outdated
Show resolved
Hide resolved
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com> Signed-off-by: Yunxuan Xiao <xiaoyunxuan1998@gmail.com>
…ple' into train/improve_fashion_mnist_example
Sorry for reviewing late. A huge fan of calling out sections. |
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com> Signed-off-by: Yunxuan Xiao <xiaoyunxuan1998@gmail.com> Co-authored-by: matthewdeng <matthew.j.deng@gmail.com> Signed-off-by: NripeshN <nn2012@hw.ac.uk>
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com> Signed-off-by: Yunxuan Xiao <xiaoyunxuan1998@gmail.com> Co-authored-by: matthewdeng <matthew.j.deng@gmail.com> Signed-off-by: harborn <gangsheng.wu@intel.com>
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com> Signed-off-by: Yunxuan Xiao <xiaoyunxuan1998@gmail.com> Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com> Signed-off-by: Yunxuan Xiao <xiaoyunxuan1998@gmail.com> Co-authored-by: matthewdeng <matthew.j.deng@gmail.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com> Signed-off-by: Yunxuan Xiao <xiaoyunxuan1998@gmail.com> Co-authored-by: matthewdeng <matthew.j.deng@gmail.com> Signed-off-by: Victor <vctr.y.m@example.com>
Why are these changes needed?
Polish the Fashion MNIST example for better onboarding experience.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.