Comments (6)
You can modify only the data and configure the data path. You may want to calculate the optimized orders with this code and put the orders in const.py
.
-
If it is different from any dataset in our code base, you need to build a new category list (such as rest_cate_list) and calculate the optimal orders of elements required in your custom dataset (such as [O][A][C][S]) via the function choose_best_order_global, then update the dict optim_orders_all.
-
You need to update the file 'force_tokens.json' for constrained decoding. Refer to prefix_allowed_tokens_fn. Note that you should first modify the category list of your dataset before doing this.
from multi-view-prompting.
The categories to which the aspect terms belong depend on your dataset. You only need to build the category list if you want to use constrained decoding, which is optional.
from multi-view-prompting.
You can modify only the data and configure the data path. You may want to calculate the optimized orders with this code and put the orders in
const.py
.
- If it is different from any dataset in our code base, you need to build a new category list (such as rest_cate_list) and calculate the optimal orders of elements required in your custom dataset (such as [O][A][C][S]) via the function choose_best_order_global, then update the dict optim_orders_all.
- You need to update the file 'force_tokens.json' for constrained decoding. Refer to prefix_allowed_tokens_fn. Note that you should first modify the category list of your dataset before doing this.
Thank you very much for your previous response. I still have a question regarding the construction of a new category list for a custom dataset. I've looked at the category lists in the code, and I'm wondering if these lists are built based on the categories to which the aspect terms belong. Additionally, the aspect terms in my custom dataset cover multiple domains. Should the category list I construct aim to encompass the domains to which the aspect terms belong as much as possible?
from multi-view-prompting.
The categories to which the aspect terms belong depend on your dataset. You only need to build the category list if you want to use constrained decoding, which is optional.
Thank you very much for your response. I wish you success in your work and a delightful life!
from multi-view-prompting.
1.Following your advice, I have been using constrained decoding on a custom dataset. While constructing the 'force_tokens.json' file, I noticed that the prefix_allowed_tokens_fn function may require some additional information. Upon comparing it with the original code in 'force_tokens.json', I believe it would be appropriate to make the following modifications by adding a dictionary for each task name.
multi-view-prompting/src/main.py
Lines 343 to 345 in d91f3ec
2.Additionally, I have encountered some issues during the decoding process in inference. Specifically, when decoding sentences consisting of only two words, such as "Great price." the output is limited to [O] great [A] price, omitting the sentiment [S] positive tags. I was wondering if you came across a similar problem during your experimentation. Could this issue be related to my utilization of constrained decoding or the [O] [A] [S] element order prompts?
I am eagerly awaiting your response!
from multi-view-prompting.
-
Thank you very much for your correction. We overlooked this part while cleaning the code, and it has now been fixed.
-
We haven't encountered this issue before. Perhaps you can check your data format.
Best regards!
from multi-view-prompting.
Related Issues (11)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multi-view-prompting.