Search code examples
google-bigquerygoogle-cloud-vertex-aigoogle-cloud-colab-enterprise

How to get a BigQuery or Vertex AI scheduled notebook to log an error to Logs Explorer when a run fails with an error?


Whenever I set up a schedule in Vertex AI or in BigQuery orchestrator to run a Colab Enterprise Python notebook, if any of the notebook runs fails, I can see a general one-sentence error description when hovering on the run result: enter image description here

But it's almost always the same non-descript "Error code 3: Error encountered during cell execution." which in no way helps me understand why that run failed.

I can open the Logs Explorer and filter errors by the job for that run, but there are no errors there, as if the job ran successfully.

Is there any way to create an error in Logs Explorer and just copy into it all the traceback of the python error that occurred when running the notebook?

I feel like that should be the default behavior and I shouldn't need to look for ways to enable logging of errors that occur during scheduled job runs.


Solution

  • I tried to reproduce the issue and effectively I see:

    Error code 3: Error encountered during cell execution.
    

    enter image description here

    I clicked View Result to get more details about the error, in this case the Python error.

    enter image description here

      File "<ipython-input-1-3aba69f82f7e>", line 1
        print(12
                ^
    SyntaxError: incomplete input
    

    Does that work for you?