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

Notebook Key Interrupted Error #7

Open
mustfkeskin opened this issue Mar 28, 2023 · 4 comments
Open

Notebook Key Interrupted Error #7

mustfkeskin opened this issue Mar 28, 2023 · 4 comments

Comments

@mustfkeskin
Copy link

Hello

This is my simple flow
I want to run my notebook first 5-6 cell work correctly
But last few cell always get KeyboardInterrupt: error
My flow dont throw any exception
But when i enter [_rendered_1679995435861952_end_2_model_examle.ipynb] i saw the error

What could be wrong here

Flow Output

2023-03-28 12:23:55.865 Workflow starting (run-id 1679995435861952):
2023-03-28 12:23:55.875 [1679995435861952/start/1 (pid 8060)] Task is starting.
2023-03-28 12:23:56.722 [1679995435861952/start/1 (pid 8060)] Start
2023-03-28 12:23:56.861 [1679995435861952/start/1 (pid 8060)] Task finished successfully.
2023-03-28 12:23:56.871 [1679995435861952/end/2 (pid 8161)] Task is starting.
2023-03-28 12:24:45.329 [1679995435861952/end/2 (pid 8161)] Task finished successfully.
2023-03-28 12:24:45.330 Done!

My Flow

from metaflow import FlowSpec, step, current, Parameter, card, resources


class LinearFlow(FlowSpec):
    
    @step
    def start(self):
        print("Start")
        self.next(self.end)
    
    @card(type='notebook')
    @step
    def end(self):
        self.nb_options_dict = dict(input_path='../notebooks/model_examle.ipynb')


if __name__ == '__main__':
    LinearFlow()

@JonathanBroadbent
Copy link

Hi,

I have the same issue. Has anyone found a fix for it yet?

For more information when I run the rendered notebook it works fine, its only during the metaflow card execution that i receive a Keyboard Interrupt: error with no other information

@mustfkeskin
Copy link
Author

I solved this by running runs with the papermill library. Metaflow also uses this in the background, but it timeouts. Since I couldn't find timeout parameter, I ignored metaflow for now.

@JonathanBroadbent
Copy link

Thanks for the information. Can you describe to me a bit more?

How do you use the papermill library? Are you still including your notebooks in the metaflow UI or did you abandon metaflow completely?

@valayDave
Copy link
Member

you can set timeout in the @card decorator to set timeouts for longer execution of the notebook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants