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

Feat/dat 474 constraints #67

Merged
merged 23 commits into from
Mar 21, 2025
Merged

Feat/dat 474 constraints #67

merged 23 commits into from
Mar 21, 2025

Conversation

tunglxfast
Copy link
Contributor

No description provided.

@tunglxfast tunglxfast self-assigned this Mar 4, 2025
@ake2l
Copy link
Member

ake2l commented Mar 5, 2025

Hey Mr Tung, i think it already looks good , i would suggest we do more tests , also with more complex data structures and also check the performance costs ( simple plain structure with 10.000 data rows one time with constraints and one without in one run ) of constraints also to have a base for fine-tuning later.

@tunglxfast
Copy link
Contributor Author

Edit to fix data generate not cyclic when distribution is ordered

@tunglxfast tunglxfast requested a review from dangsg March 5, 2025 11:00
@tunglxfast
Copy link
Contributor Author

tunglxfast commented Mar 5, 2025

need to limit only one constraints tag per generate (working)

if_rule: str = Field(alias=ATTR_IF)
then_rule: str = Field(alias=ATTR_THEN)

# @field_validator("if_rule", "then_rule")
Copy link
Collaborator

Choose a reason for hiding this comment

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

please remove dead code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, comment it out for test, but forgot to uncomment them

@@ -188,6 +190,11 @@ def _generate_product_by_page_in_single_process(
)
)

# filter source_data with constraints-rule task when specify
for task in tasks:
Copy link
Collaborator

@dangsg dangsg Mar 6, 2025

Choose a reason for hiding this comment

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

rule_task(or constraint_task).execute() should modify geniter_ctx.current_product instead of source_data for easier debugging. Also use method execute() instead of filter() for more codebase consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried modify geniter_ctx.current_product in commit "try execute rule in task, not good". But the result bad, it like this:
synthetic_customers: {}
synthetic_customers: {}
synthetic_customers: {}
synthetic_customers: {'firstname': 'Bob', 'lastname': 'Johnson', 'age': 38, 'city': 'San Antonio', 'credit_score': 431, 'risk_profile': 'High', 'id': 26}
synthetic_customers: {}
synthetic_customers: {}
synthetic_customers: {}
synthetic_customers: {}

@ake2l
Copy link
Member

ake2l commented Mar 7, 2025

I am still missing a cascaded test ( simple , but cascaded) and also one with nestedKeys ... please add , apart from this looks good

@ake2l
Copy link
Member

ake2l commented Mar 13, 2025

@tunglxfast how it is goin with this ? ... i think this is helpful --> I am still missing a cascaded test ( simple , but cascaded) and also one with nestedKeys ... please add , apart from this looks good ... Please finalise this with dang

@tunglxfast tunglxfast merged commit 475f860 into development Mar 21, 2025
18 checks passed
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.

3 participants