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

yaml template custom tag #9

Open
0Frett opened this issue Aug 2, 2023 · 1 comment
Open

yaml template custom tag #9

0Frett opened this issue Aug 2, 2023 · 1 comment

Comments

@0Frett
Copy link

0Frett commented Aug 2, 2023

Hi the yaml template has two custom tag, which are !Template and !Meta. When I use fulloader, the loader can't recognize the two custom tags and report constructor error. However, I didn't find file or function relevant to the constructor definition. Thanks!

@stefanhgm
Copy link
Contributor

Hello @0Frett ,

sorry for the late reply and thanks for using our code and reaching out!

I remember that I had a similar issue. The yaml template comes from the promptsource framework. Maybe its already enough to add the following imports:

from promptsource.templates import DatasetTemplates, Template

And just to be sure: are you loading the templates like in our code:

# Load template
yaml_dict = yaml.load(open('/root/TabLLM/templates/templates_' + task + '.yaml', "r"), Loader=yaml.FullLoader)
prompts = yaml_dict['templates']

Let us know if you need any further help!

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