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

[Plugin] Hamilton #2627

Closed
skrawcz opened this issue Jun 23, 2022 · 10 comments
Closed

[Plugin] Hamilton #2627

skrawcz opened this issue Jun 23, 2022 · 10 comments
Labels
plugins Plugins related labels (backend or frontend) stale

Comments

@skrawcz
Copy link

skrawcz commented Jun 23, 2022

What: https://github.com/stitchfix/hamilton defines a way to model a micro-workflow. Flyte models a macro view. So idea (I think) would be to run a Hamilton DAG within a flyte task more easily than it would be now.

i.e. replace this driver code that would be put into a flyte task:

import importlib

import pandas as pd
from hamilton import driver

logging.basicConfig(stream=sys.stdout)
initial_columns = {  # load from actuals or wherever -- this is our initial data we use as input.
    # Note: these do not have to be all series, they could be scalar inputs.
    'signups': pd.Series([1, 10, 50, 100, 200, 400]),
    'spend': pd.Series([10, 10, 20, 40, 40, 50]),
}
# we need to tell hamilton where to load function definitions from
module_name = 'my_functions'
module = importlib.import_module(module_name)
dr = driver.Driver(initial_columns, module)  # can pass in multiple modules
# we need to specify what we want in the final dataframe.
output_columns = [
    'spend',
    'signups',
    'avg_3wk_spend',
    'spend_per_signup',
]
# let's create the dataframe!
# if you only did `pip install sf-hamilton` earlier:
df = dr.execute(output_columns)
# else if you did `pip install sf-hamilton[visualization]` earlier:
# dr.visualize_execution(output_columns, './my-dag.dot', {})
print(df)

See https://github.com/outerbounds/hamilton-metaflow for an example of Hamilton + metaflow -- hamilton helps with the feature engineering step. So conceptually we'd try to integration simpler than just creating a task in flyte, with a plugin instead...

@welcome
Copy link

welcome bot commented Jun 23, 2022

Thank you for opening your first issue here! 🛠

@skrawcz
Copy link
Author

skrawcz commented Jun 23, 2022

Related feature idea - stitchfix/hamilton#139

@wild-endeavor wild-endeavor added the plugins Plugins related labels (backend or frontend) label Jul 22, 2022
@github-actions
Copy link

github-actions bot commented Sep 3, 2023

Hello 👋, This issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will close the issue if we detect no activity in the next 7 days. Thank you for your contribution and understanding! 🙏

@github-actions github-actions bot added the stale label Sep 3, 2023
@skrawcz
Copy link
Author

skrawcz commented Sep 3, 2023

Oops. Definitely forgot about this one. Will figure out it's priority next sprint.

@github-actions github-actions bot removed the stale label Sep 4, 2023
@skrawcz
Copy link
Author

skrawcz commented Sep 18, 2023

So circling back to this. We're looking to schedule this for sometime in November/December.

@skrawcz
Copy link
Author

skrawcz commented Feb 9, 2024

Sorry -- still working on this one.

@skrawcz
Copy link
Author

skrawcz commented May 30, 2024

I'll get to this eventually...

Copy link

Hello 👋, this issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will engage on it to decide if it is still applicable.
Thank you for your contribution and understanding! 🙏

@github-actions github-actions bot added the stale label Feb 25, 2025
@kumare3 kumare3 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2025
@skrawcz
Copy link
Author

skrawcz commented Feb 26, 2025

Yeah I think it makes sense to close for now. Haven't had the pull to bump it up in priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins Plugins related labels (backend or frontend) stale
Projects
None yet
Development

No branches or pull requests

3 participants