clean()
function to help you remove temporary files and folders after processing. This guide will show you how to use this cleanup utility effectively.
clean()
function is part of Runpod’s serverless utilities. It helps maintain a clean environment by removing specified folders and files after a job is completed.
To use it, import the function from the Runpod serverless utilities:
clean()
removes the following:
input_objects
folderoutput_objects
folderjob_files
folderoutput.zip
fileclean()
function in your AI model handler:
clean()
is called after the model processing is complete, ensuring that temporary files and folders are removed.
clean()
function:
clean()
at the end of your handler to ensure proper cleanup.clean()
function in your handlers, you ensure that each job starts with a clean slate, preventing potential issues caused by leftover files from previous runs.