The difference is likely related to the execution context rather than the script itself. Iād compare environment variables, cluster/session initialization, dependency versions, and timing between notebook and API-triggered runs. Logging timestamps an...