mlrichmond-mill
New Contributor III

Following up further, I went back to the "simple" case - but it still doesn't work. I can see in the logs that my library is found and loaded:

Uninstalling nexusbricks-0.1.0:
Successfully uninstalled nexusbricks-0.1.0
Note: you may need to restart the kernel using %restart_python or dbutils.library.restartPython() to use updated packages.
Processing /Volumes/almdev/transient/staging/artifacts/mark.richmond@milliman.com/DBX/dev/4f8943f6460ba7cd2ad50c82e50f2bebf1cf02db/.internal/nexusbricks-0.1.0-py3-none-any.whl (from -r /tmp/tmp-6746852034be4303a9151e05775bf74d-environment-requirements.txt (line 1))
Requirement already satisfied: pyspark in /local_disk0/.ephemeral_nfs/envs/pythonEnv-35cd5d82-6a03-448d-b711-7f1f603acfb9/lib/python3.11/site-packages (from nexusbricks==0.1.0->-r /tmp/tmp-6746852034be4303a9151e05775bf74d-environment-requirements.txt (line 1)) (4.1.1)
Requirement already satisfied: py4j<0.10.9.10,>=0.10.9.7 in /databricks/python3/lib/python3.11/site-packages (from pyspark->nexusbricks==0.1.0->-r /tmp/tmp-6746852034be4303a9151e05775bf74d-environment-requirements.txt (line 1)) (0.10.9.7)
Installing collected packages: nexusbricks
Successfully installed nexusbricks-0.1.0

However the wheel task still fails:

Run failed with error message
 Python wheel with name nexusbricks could not be found. Please check the driver logs for more details
Python wheel with name nexusbricks could not be found. Please check the driver logs for more details

After a bunch of chatting with the databricks agent bot - it seems to imply that wheel tasks simply *don't* work on Serverless as it suggests that you must use libraries, which requires a cluster as we previously established.

I've gone through dozens of permutations at this point and am unable to get a wheel task to run on serverless at all.

The issue above here is because environment_version: "2" apparently does not support loading the wheel correctly. Changing to environment_version: "4" resolved this issue. When you have time, I'd still appreciate answers re: artifact_path and best practices for dev/prod.

Thanks.

View solution in original post