add Conic10k data generating part - #24
Conversation
This reverts commit b814785. git add . git commit -m "revert"
…arsing into q_upload_change
msg-bq
left a comment
There was a problem hiding this comment.
这次用不到的文件先移除掉吧,可能包括EDA、data_procee、pyc、PCFG等?
| import re | ||
| from openai import OpenAI | ||
|
|
||
| instruction = '''You are a language expert. When I give you a formal text of assertion logic and related assertion logic knowledge, you need to convert it into a mathematical problem. |
There was a problem hiding this comment.
是因为_generate_nl_topv2.py的效果不好吗,还是说你随便试了一个(我只是问一下,无所谓倒是)
| @@ -0,0 +1,25 @@ | |||
| { | |||
| "Curve": "曲线", | |||
There was a problem hiding this comment.
这俩文件的作用是,你希望在提示词里,每次把所有的中文解释传递给大模型吗
There was a problem hiding this comment.
对的,只不过不是一次性提供所有的operators,表达式里涉及到哪些我就提供哪些
remove irrelevant files
| from ._instance_prompt import _concept_instance_prompt | ||
| from generate_dataset.gen_utils.access_llm import async_query_gpt | ||
| from build_labels.instance_funcs._instance_prompt import _concept_instance_prompt | ||
| from gen_utils.access_llm import async_query_gpt |
There was a problem hiding this comment.
你移除了generate_dataset前缀,是因为跑不起来吗。按理说main.py我有一个代码是
parent_dir = str(Path(__file__).resolve().parent.parent)
sys.path.append(parent_dir)
换机器也会把generate_dataset的父目录放进去的叭
| Question: Please randomly give an instance about "{}"\nAnswer:''' | ||
| # Question: Please randomly give an instance about "{}"\nAnswer:''' | ||
|
|
||
| instruct = '''You are an example generator. When I give you a concept "EXPRESSION", you need to give some specific examples about it. |
| Question: Please randomly give an instance about "{}"\nAnswer:''' | ||
| # Question: Please randomly give an instance about "{}"\nAnswer:''' | ||
|
|
||
| instruct = '''You are an example generator. When I give you a concept "EXPRESSION", you need to give some specific examples about it. |
There was a problem hiding this comment.
作为todo(而且可能是optional的todo)叭,此刻的替代品是"无法顾名思义的concept,就单独提供一个provider"(你已经实现过的东西就按你的来即可)
* 移除逗号作为分隔符的情况 * remove modeling_to_cfg.py * replace all_operators by Declared_Operators * update instance prompt explanation * 文件夹名称修改为ad hoc,其中有用的我之后会迁移出来 * allow cfg file args from command or func argument * remove redundant code
| # return Assertion(lhs=term_lhs, rhs=term_rhs), left_declarations + right_declarations | ||
| return None, None | ||
|
|
||
| elif count == 0: |
| def __str__(self): | ||
| variables_str = ", ".join(map(str, self.variables)) | ||
| return f"{self.operator.name}({variables_str})" | ||
| if self.variables != None: |
There was a problem hiding this comment.
确认下,你应该没有operator is not None但variables is None的情况叭?
| Question: Please randomly give an instance about "{}"\nAnswer:''' | ||
| # Question: Please randomly give an instance about "{}"\nAnswer:''' | ||
|
|
||
| instruct = '''You are an example generator. When I give you a concept "EXPRESSION", you need to give some specific examples about it. |
* 移除逗号作为分隔符的情况 * remove modeling_to_cfg.py * replace all_operators by Declared_Operators * update instance prompt explanation * 文件夹名称修改为ad hoc,其中有用的我之后会迁移出来 * allow cfg file args from command or func argument * remove redundant code * split parse func and change operator=None to dummy_operator * remove declaration in _parse_derivation_conic10k to keep consistency between tasks * remove declaration in _parse_derivation_conic10k to keep consistency (cont.) 我也不知道为什么丢了一段代码 * restore validity check of Term * just improve code quality

新增 _parse_derivation_conic10k

主要数据在generate_dataset/assertions_output文件夹中