pytorch-ignite / code-generator

Web Application to generate your training scripts with PyTorch Ignite
https://code-generator.pytorch-ignite.ai/
BSD 3-Clause "New" or "Revised" License
40 stars 23 forks source link

PR to improve the hash function for uuid #312

Closed theory-in-progress closed 1 year ago

theory-in-progress commented 1 year ago

Additional context

Currently, uuid hashes only the current store.config, so any changes in store.config would change the uuid, but suppose we follow the steps:

  1. Commit a template using x config with uuid: 53asdf
  2. We then change the code in the python files, in the template, this would be reflected in the ui and won't affect the download zip option, but essentially there is no change in the store.config
  3. We again try to commit a template using the same x config, so the uuid would be the same: 53asdf since the store.config is the same. This would not create a new commit like it should since we changed the py files, but fetches the template from the previous commit...

What is the purpose of this pull request?

netlify[bot] commented 1 year ago

Deploy Preview for code-generator ready!

Name Link
Latest commit a0cb360830be244d2523327fb5635bbd3dab511b
Latest deploy log https://app.netlify.com/sites/code-generator/deploys/64f6e64278ff830008296987
Deploy Preview https://deploy-preview-312--code-generator.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

guptaaryan16 commented 1 year ago

Can you check if instead of parsing all files if we parse just the main.py file does this feature work(as I think for all options there is always a change in main.py file) and what can be the time advantages ?

theory-in-progress commented 1 year ago

For the previous code where we hashed the store.config we got a time difference around 1-2 milliseconds, but for the current PR Where we hash the whole code, we get a time difference of around ~5 milliseconds.

So considering this, if we hash only the main.py that still would range between 1-5 milliseconds, not much time difference I would say...