How do I resolve missing output from cells in my SageMaker AI notebook?

2 minute read
0

I want to resolve missing output from cells in my Amazon SageMaker AI notebook.

Resolution

To troubleshoot missing output from cells in your SageMaker AI notebook, complete the resolution for your issue.

Troubleshoot missing output after you disconnect or close your browser

If you close your browser or disconnect during a long-running cell operation, then you might lose the output when you reconnect.

To avoid this issue, store your output in a variable. In your notebook cell, run the following built-in Magic command:

%%capture output
code_example

Note: Replace code_example with your cell code. For more information, see %%capture on the Read the Docs website.

To view the captured output, first reconnect. Then, open a new cell and run the following command:

output.show()

Or, run the following command to run the notebook offline:

jupyter nbconvert --execute --to notebook --inplace /path/to/your/notebook.ipynb --ExecutePreprocessor.kernel_name=python3

For more information, see Using as a command line tool on the Read the Docs website.

Troubleshoot partial or stuck output

If you receive partial output or the operation is stuck, then reduce the amount of output your code prints.

If you still experience the issue after you reduce the output, then check your notebook instance resource utilization.

(Optional) To review your Jupyter logs for kernel issues, monitor Jupyter logs in Amazon CloudWatch Logs, or run the following command:

tail -f /var/log/jupyter.log

Troubleshoot no output

If you don't receive output, then take the following actions:

  • Clear your browser cache and cookies, or use a different browser.
  • Check for firewalls or network configurations that block traffic.
  • Update your notebook instance to remove lifecycle configurations or customizations.

Troubleshoot output issues with specific packages or large datasets

Make sure that you're using the correct instance type for your workload.

Note: It's a best practice to use SageMaker AI processing jobs for heavy data processing tasks.

For visualization issues, use an alternate plotting library.

If you still experience issues, then contact AWS Support.

In your support case, include the following information:

  • SageMaker AI notebook instance ARN
  • Jupyter and Python versions
  • Output of pip freeze from the problematic kernel
  • Code example that reproduces the issue
  • Relevant error messages or logs
AWS OFFICIAL
AWS OFFICIALUpdated 13 days ago