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
Creating unique identifier in the template.yaml #29
Comments
As an extension, I think we can also keep a user from saving an empty template (currently we can save a template right after entering the name). However, @arnaudstiegler if we remove the template name, do you think it can make it difficult for one to trace back to the template they created? As an alternative, I think we can have the author's name saved in the template so that it's easier to filter but I'm sure there are other better ways. |
For sure keeping the template name is better to retrieve some templates. That being said, I believe the template name should not be used as a database key here:
|
Actually, I want us to separate templates for each dataset. You would have as many There are two reasons for that (as discussed in #23 ): The author's name would be naturally tracked on Github via the commit history. On the template name, I think we should autocomplete ( If someone wants to take these action items, please do! |
I'll get to it tonight if no one claims it before then! |
Yes, if one person is assigned to one dataset, there's a lot less risks of conflict and we don't really have to deal with that at all. |
Sure, help is always appreciated! I'll tag you too. I was thinking we'd just modify |
yes, that makes sense. |
Yup, that could work nicely! The only reason I can see that we need to read them all is because we allow users to filter based on how many templates there are for a dataset. So another way you could do it is read that info once and only then touch the modified files after that. Not sure which is better. |
Have a draft for that, will open a PR by end of day to get some feedback. It does one full-read, and selected writes on modified files. However, it does require to keep in mem all templates from all datasets (we could circumvent that, but I don't think it's worth the effort). |
Closing for now since this was essentially resolved by #34, even though we didn't actually create unique IDs. |
After talking with @arnaudstiegler, I came to the realization that there is another advantage to using uids. |
Sure, I can open a PR that will:
|
For now, it looks like we can sort of uniquely identify each template using a combination of template name and dataset name, but I'm expecting potential collisions when a lot of people start contributing. Besides, naming each template might not be useful (like if we end up with names like
template1
template2
etc...), and it would help contributors if they don't have to add a name/check conflicts on the naming part before merging their template.yaml.I was thinking that we could add an ID to each entry by getting the hash of timestamp + dataset + string of prompt python function or jinja template? That should be more than enough to prevent collisions
The text was updated successfully, but these errors were encountered: