-
Notifications
You must be signed in to change notification settings - Fork 164
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
Generate model ID based on hash of its parameters #43
Comments
@kerrickstaley and I explain why it would not be wise to do so in #49 (comment). Basically it would mean that one cannot update the model without generating obsolete models in user databases. |
Hello, Thank you for this awesome and simple library. Would it be wise for the user to generate a model id and deck id with the hash of a string hardcoded in the program? I generated 12 decks using the same model of cards. For the model I used id This somewhat contradicts your advice to use random numbers, but not too much. Is that OK or is there some counter-argument? |
The return value of hash() for a given input changes across runs of your program. So no, that isn’t a good approach because the deck ID will change every time you run the program. You could consider using a SHA256 hash though. |
Thank you for the quick response! I'm using |
No description provided.
The text was updated successfully, but these errors were encountered: