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

Error cleanly when no output requested using .materialize #796

Open
skrawcz opened this issue Mar 29, 2024 · 0 comments
Open

Error cleanly when no output requested using .materialize #796

skrawcz opened this issue Mar 29, 2024 · 0 comments
Labels
triage label for issues that need to be triaged.

Comments

@skrawcz
Copy link
Collaborator

skrawcz commented Mar 29, 2024

If no output is requested using .materialize() we don't error at all.

Current behavior

It gets stuck in an infinite loop.

Steps to replicate behavior

This recreates the behavior -- there is no output requested.

# test.py
from hamilton import driver
from hamilton.plugins import h_experiments
from hamilton.io.materialization import to, from_

def connect(a:dict) -> str:
    print('connect')
    print(a)
    return 'connect'

if __name__ == "__main__":
    import test

    tracker_hook = h_experiments.ExperimentTracker(
        experiment_name='exp',
        base_directory='.',
    )


    dr = (
        driver.Builder()
        .with_modules(test)
        .enable_dynamic_execution(allow_experimental_mode=True)
        # .with_execution_manager(execution_manager)
        .with_adapters(tracker_hook)
        .build()
    )
    materilizers = [
        from_.pickle(path='./data.pickle', target='a'),
    ]
    dr.materialize(*materilizers)

Library & System Information

Latest hamilton, mac.

Expected behavior

It errors out.

Additional context

@skrawcz skrawcz added the triage label for issues that need to be triaged. label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage label for issues that need to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant