I am trying to understand the source of runtime error when I run the following python function in a databricks notebook vs importing and invoking it from a module
Running directly on databricks notebook
def test_numba_func():
from numba import jit
@jit(cache=True)
def test():
return .5 ** 2 / 4.0
print(test())
invoking this function does not work
test_numba_func()
RuntimeError: cannot cache function 'test_numba_func..test': no locator available for file ''
However if I create a module say databricks_test.py with the same function, then the following import works without any issues.
Module import
import databricks_test
databricks_test.test_numba_func()
I am able to run in directly in Colab though.
I think this is due to some rights issue. How can I fix my code to make it work against databricks?

