Skip to content

add Conic10k data generating part - #24

Draft
Chillyzz wants to merge 10 commits into
q_upload_changefrom
conic10k_data_generate
Draft

add Conic10k data generating part#24
Chillyzz wants to merge 10 commits into
q_upload_changefrom
conic10k_data_generate

Conversation

@Chillyzz

Copy link
Copy Markdown
Collaborator
  1. 新增 _parse_derivation_conic10k
    image

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

@msg-bq msg-bq left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这次用不到的文件先移除掉吧,可能包括EDA、data_procee、pyc、PCFG等?

Comment thread DataAugment_EDA/ChineseTextEDA/eda.py Outdated
Comment thread data_process/check_sentence.py Outdated
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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是因为_generate_nl_topv2.py的效果不好吗,还是说你随便试了一个(我只是问一下,无所谓倒是)

@@ -0,0 +1,25 @@
{
"Curve": "曲线",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这俩文件的作用是,你希望在提示词里,每次把所有的中文解释传递给大模型吗

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对的,只不过不是一次性提供所有的operators,表达式里涉及到哪些我就提供哪些

@msg-bq msg-bq May 26, 2025

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同理
image

Comment thread generate_dataset/assertions_output/problems/filter.py
Comment thread generate_dataset/parse_funcs/_parse_derivation_topv2.py Outdated
Comment thread generate_dataset/parse_funcs/_parse_derivation_topv2.py Outdated
Comment thread generate_formals_in_PCFG.py Outdated
Comment thread generate_individual_func/from_builtin/get_operators.py Outdated
Comment thread generate_natural_statements.py Outdated
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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你移除了generate_dataset前缀,是因为跑不起来吗。按理说main.py我有一个代码是
parent_dir = str(Path(__file__).resolve().parent.parent)
sys.path.append(parent_dir)
换机器也会把generate_dataset的父目录放进去的叭

Comment thread generate_dataset/modeling/base_classes.py Outdated
Comment thread generate_dataset/parse_funcs/_parse_derivation_topv2.py Outdated
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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哦,我这次都没放concept的class

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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作为todo(而且可能是optional的todo)叭,此刻的替代品是"无法顾名思义的concept,就单独提供一个provider"(你已经实现过的东西就按你的来即可)

Comment thread generate_dataset/assertions_output/random_merge.py Outdated
* 移除逗号作为分隔符的情况

* 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:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有equals的是什么情况?

Comment thread generate_dataset/modeling/base_classes.py Outdated
Comment thread generate_dataset/modeling/base_classes.py Outdated
def __str__(self):
variables_str = ", ".join(map(str, self.variables))
return f"{self.operator.name}({variables_str})"
if self.variables != None:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确认下,你应该没有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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本项已解决,留着只是给你看一下。看完可以点resolve了

@msg-bq
msg-bq marked this pull request as draft May 25, 2025 16:35
msg-bq and others added 2 commits May 26, 2025 00:57
* 移除逗号作为分隔符的情况

* 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
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

Successfully merging this pull request may close these issues.

2 participants