这是indexloc提供的服务,不要输入任何密码
Skip to content

[Bug] Join failed to get groupBy module on different file structure #867

@mickjermsurawong-openai

Description

  • Join code expects to get module object from the groupby that looks like below
    for ref in gc.get_referrers(group_by):
    if "__name__" in ref and ref["__name__"].startswith("group_bys"):
    group_by_module_name = ref["__name__"]
{'__name__': 'chronon_features.joins.quickstart.training_set', 
'__doc__': None, 
'__package__': 'chronon_features.joins.quickstart', 
'__loader__': <ddtrace.internal.module._ImportHookChainedLoader object at 0x110e7aed0>, '__spec__': ModuleSpec(name='chronon_features.joins.quickstart.training_set'
...
}
  • One potential problem, when referrer of the group_by isn't a dict or iterable, (In my case JoinPart object itself is the referrer, this check would fail
TypeError: argument of type 'JoinPart' is not iterable
  • Second potential problem, the check of name starting "group_bys" assumes that we have group_by as top-level. In my case, i have a separate python project chronon_features, so it would expect module name as chronon_features.group_bys

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions