Juan David Patiño Guerra
12/11/2023, 10:16 AMJuan Luis
12/11/2023, 10:20 AMdatabricks_run.py
has the contents of the documentation, that import will not work (it would need to be something like from wine_model_kedro.databricks_run import main
, which hints that maybe your entry point definition is not correct.
can you share the relevant part of your setup.py
and a screenshot of your job definition to make sure that everything is okay?Juan David Patiño Guerra
12/11/2023, 10:25 AMsetup.py
file:
from setuptools import find_packages, setup
entry_point = (
"wine-model-kedro = wine_model_kedro.__main__:main"
)
# get the dependencies and installs
with open("requirements.txt", encoding="utf-8") as f:
# Make sure we strip all comments and options (e.g "--extra-index-url")
# that arise from a modified pip.conf file that configure global options
# when running kedro build-reqs
requires = []
for line in f:
req = line.split("#", 1)[0].strip()
if req and not req.startswith("--"):
requires.append(req)
setup(
name="wine_model_kedro",
version="0.1",
packages=find_packages(exclude=["tests"]),
entry_points={"console_scripts": [entry_point]},
install_requires=requires,
extras_require={
"docs": [
"docutils<0.18.0",
"sphinx~=3.4.3",
"sphinx_rtd_theme==0.5.1",
"nbsphinx==0.8.1",
"nbstripout~=0.4",
"sphinx-autodoc-typehints==1.11.1",
"sphinx_copybutton==0.3.1",
"ipykernel>=5.3, <7.0",
"Jinja2<3.1.0",
"myst-parser~=0.17.2",
]
},
)
entry_point = (..., "databricks_run = wine_model_kedro.databricks_run:main")
Juan Luis
12/11/2023, 10:38 AMentry_point = (...)
presumably has no effect, because it happens after the setup()
function cal. could you try adding that above? like
entry_points = (
"wine-model-kedro = wine_model_kedro.__main__:main",
"databricks_run = wine_model_kedro.databricks_run:main"
)
and then use the databricks_run
entry point for your DB jobJuan David Patiño Guerra
12/11/2023, 5:01 PMJuan Luis
12/11/2023, 5:35 PMJuan David Patiño Guerra
12/12/2023, 4:36 PMecho "consent: false" > .telemetry
.
The thing is that I don't seem to get it right, as it keeps asking for permission even after I create the .telemetry file (at least that seems to be happening). I am running this as part of a databricks asset bundles pipeline (works similar to dbx), so I define the way the pipeline should be in a yaml file.
Doing pip uninstall doesn't seem simple to do once the cluster is created. So I look at the creation of the .telemetry file.
In the init script (see atachment), I run the code I presented above. Yet it still asks for permissions.
Am I missing something or is this a Databricks limitation with Kedro? I can share more info if needed. Thanks in advance (again)!Juan Luis
12/12/2023, 6:47 PMThe solution seems to be to either uninstall kedro-telemetry via pip or to runin principle that should be it.echo "consent: false" > .telemetry
The thing is that I don't seem to get it right, as it keeps asking for permission even after I create the .telemetry fileprobably a matter of where the
.telemetry
file is placed...
but again, this is much more complicated than it should already. at this point it's better that you remove kedro-telemetry
from your dependencies so it doesn't get installed in the cluster. I left a comment in the appropriate issue, we'll likely tackle this at the beginning of next yearJuan David Patiño Guerra
12/12/2023, 7:34 PMJuan Luis
12/12/2023, 8:34 PMJuan David Patiño Guerra
12/13/2023, 9:26 AMJuan Luis
12/13/2023, 9:37 AMJuan Luis
12/13/2023, 9:37 AMJuan David Patiño Guerra
12/13/2023, 9:43 AM