Most sources I'm looking at seem to indicate a notebook should stop if an error happens (like this one trying to stop only 1 cell instead of all of them); however, I'm finding that while the current cell stops, my subsequent cells still try to run (many throwing errors since variables don't get properly defined from earlier errors). The execution continues running the rest of the notebook regardless, I'm unsure if this behavior is different because of vertex AI. Is this intended behavior and if so is there a built in way into vertex AI/Jupyter notebook to stop the whole execution?
Originally I assumed doing sys.exit() would work; however this only stops the current cell. other ideas included looking for a %word built in to stop execution and using assert False, all of these had the same outcome of stopping the current cell but later cells still run. My current solution is to set a variable to True if I want the program to stop and then have an if variable then sys.exit() at the start of every cell which will cause every cell to stop early but this feels like a hacky solution