Skip to main content

Debug

Code Debugging

When deploying on Leapcell, there are generally three areas to confirm:

  • Runtime:

Check if the runtime includes what you need. If not, you can install it through the following Build Command.

  • Build Command:

Verify that the Build Command is correct, ensuring it includes the necessary dependencies for your code. If not, you can install them using the specified Build Command.

  • Run Command:

Check if the Run Command is correct. Also, make sure the Run Command starts quickly enough. For instance, the following Python code takes a while to start because it needs to download a model. If the startup time is too long, consider downloading the model locally or packaging it into the image.

import huggingface_hub

model = huggingface_hub.HfApi().model_info("microsoft/DialoGPT-large")
model.save_pretrained("model")

Observability

Logging

Leapcell captures all stderr and stdout outputs and logs them in the Log section. You can view Leapcell's log output by clicking on the toolbar's Log button.

Leapcell's logging supports two modes: Aggr and Tail. In Aggr mode, all logs are sorted in the order they appear. In Tail mode, the most recent logs are displayed at the top.

You can use the search box to search for specific logs.