metaflow-card-notebook
metaflow-card-notebook copied to clipboard
Notebook Key Interrupted Error
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()
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
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.
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?
you can set timeout
in the @card
decorator to set timeouts for longer execution of the notebook.