Skip to content

PR to improve the hash function for uuid #312

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

Merged
merged 7 commits into from
Sep 5, 2023

Conversation

theory-in-progress
Copy link
Contributor

  • This PR aims to measure the time overhead caused by the current hashing of store.config and hashing of the whole code in the template.

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?

  • Bug fix
  • New feature
  • Other

@netlify
Copy link

netlify bot commented Sep 1, 2023

Deploy Preview for code-generator ready!

Name Link
🔨 Latest commit a0cb360
🔍 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.

@theory-in-progress theory-in-progress marked this pull request as draft September 1, 2023 11:12
@theory-in-progress theory-in-progress marked this pull request as ready for review September 5, 2023 08:19
@guptaaryan16
Copy link
Contributor

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
Copy link
Contributor Author

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...

Copy link
Member

@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.

LGTM, thanks @theory-in-progress !

Please make sure that CI is passing

@vfdev-5 vfdev-5 merged commit ef156f6 into pytorch-ignite:main Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants