airbnb / chronon

Chronon is a data platform for serving for AI/ML applications.
Apache License 2.0
746 stars 53 forks source link

Join failed to get groupBy module on different file structure #868

Open MickJermsurawong opened 1 month ago

MickJermsurawong commented 1 month ago

Summary

I made a quick repro and curious on your input. I think when people define chronon features, it's expected they follow the structure, but it can live within some directories.. In that way, i think allowing flexible top module should be allowed. And we should be able to refer to chronon features object like other piece of python code. In this PR,

Why / Goal

Test Plan

Checklist

Reviewers

nikhilsimha commented 1 month ago

ah, the fix here is to set python path to your top level chronon configuration directory.

if vscode recognizes the path, compile.py should too.

MickJermsurawong commented 1 month ago

thanks nikhil, yup appending python path works.. for now i have to add add pythonpath in unit test, wrapping for compile.py, and add ignore on mypy. I think it would be great if we can treat these definitions like native python resources using the standard python module references

nikhilsimha commented 1 month ago

They should work like standard python references actually - it is just that the python env needs to be setup to recognize chronon on the module. Or maybe I am misunderstanding, is it a wrong assumption for the framework to expect the top level chronon directory (sample in this case) to be on python path?