-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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. |
Edit to fix data generate not cyclic when distribution is ordered |
need to limit only one constraints tag per generate (working) |
datamimic_ce/model/rule_model.py
Outdated
if_rule: str = Field(alias=ATTR_IF) | ||
then_rule: str = Field(alias=ATTR_THEN) | ||
|
||
# @field_validator("if_rule", "then_rule") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove dead code
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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: {}
I am still missing a cascaded test ( simple , but cascaded) and also one with nestedKeys ... please add , apart from this looks good |
@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 |
|
No description provided.