Skip to content
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

Assign ID automatically #2

Open
JJ opened this issue Jun 12, 2019 · 3 comments
Open

Assign ID automatically #2

JJ opened this issue Jun 12, 2019 · 3 comments

Comments

@JJ
Copy link
Collaborator

JJ commented Jun 12, 2019

I use usually a "prefix" to assign an ID that depends on the type of experiment, but the ID should be assigned automatically. However, I don't see where used IDs are stored. They seem to be on a queue, but there's no way to see which ones have been used already.
A simple query to redis should take care of that... IDs would be automatically assigned using auto-increment together with the prefix.

@mariosky
Copy link
Owner

I have two ideas for this.

  1. In EvoSpace for instance, I just used a prefix plus a timestamp, is short and sequential. For other lower level IDs like WorkerID or MessageID, we generate a UUID.

  2. The other idea is to have a settings.py file where each advanced user can generate the JSON as he pleases. For instance, we can have a python dictionary with an EXPERIMENT_ID key:

"EXPERIMENT_ID": str (uuid.uuid4())

@JJ
Copy link
Collaborator Author

JJ commented Jun 13, 2019 via email

@mariosky
Copy link
Owner

@JJ Please check d2a3143

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

No branches or pull requests

2 participants