Skip to content

Conversation

@FarehaNousheen
Copy link
Contributor

@FarehaNousheen FarehaNousheen commented Oct 6, 2021

Fixes #2239

Description: Update Install links for PyTorch XLA in MNIST TPU

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • The PyTorch XLA install link is updated

@github-actions github-actions bot added the examples Examples label Oct 6, 2021
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 6, 2021

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 6, 2021

@FarehaNousheen could you please also add missing f-strings:

    pbar.log_message(
-        "Training Results - Epoch: {engine.state.epoch}  Avg accuracy: {avg_accuracy:.2f} Avg loss: {avg_nll:.2f}"
+        f"Training Results - Epoch: {engine.state.epoch}  Avg accuracy: {avg_accuracy:.2f} Avg loss: {avg_nll:.2f}"
    )

and

    print(
-        "Validation Results - Epoch: {engine.state.epoch}  Avg accuracy: {avg_accuracy:.2f} Avg loss: {avg_nll:.2f}"
+        f"Validation Results - Epoch: {engine.state.epoch}  Avg accuracy: {avg_accuracy:.2f} Avg loss: {avg_nll:.2f}"
    )

@vfdev-5 vfdev-5 changed the title Update MNIST_on_TPU.ipynb [skip ci] Update MNIST_on_TPU.ipynb Oct 6, 2021
@FarehaNousheen
Copy link
Contributor Author

FarehaNousheen commented Oct 7, 2021 via email

@Ishan-Kumar2
Copy link
Contributor

Hi @FarehaNousheen thanks for the changes.
I think your latest commit has messed up the notebook JSON format. I am not able to open it here and locally.
It might have been caused due to making edits in the raw format, to fix it you can remove the changes in the last commit and then update the text after opening as a Jupyter notebook.

@FarehaNousheen
Copy link
Contributor Author

FarehaNousheen commented Oct 8, 2021 via email

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FarehaNousheen !

@vfdev-5 vfdev-5 merged commit 9468c0a into pytorch:master Oct 14, 2021
@FarehaNousheen
Copy link
Contributor Author

The notebook is checked on google collab. Sharing the link below for further step.
https://colab.research.google.com/github/pytorch/ignite/blob/118b16a529a14e28eadde37d92cfc88305ab3932/examples/notebooks/MNIST_on_TPU.ipynb

@FarehaNousheen
Copy link
Contributor Author

FarehaNousheen commented Oct 14, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples Examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update install links for PyTorch XLA in MNIST TPU example

3 participants