neptune-ai / kedro-neptune

📌 Track & manage metadata, visualize & compare Kedro pipelines in a nice UI.
https://docs.neptune.ai/integrations-and-supported-tools/automation-pipelines/kedro
Apache License 2.0
18 stars 4 forks source link

BUG: kedro 0.18 compatibility #34

Closed guemues closed 2 years ago

guemues commented 2 years ago

Describe the bug

When initializing kedro-neptune with kedro version >=0.18.0 it throws an error.

ImportError: cannot import name 'get_current_session' from 'kedro.framework.session' (/Users/guemues/.env/ltvsim-3.10/lib/python3.10/site-packages/kedro/framework/session/__init__.py)

Could be resolved with https://github.com/neptune-ai/kedro-neptune/pull/33

Reproduction

kedro neptune init

Expected behavior

Should be initialized as version dependencies for kedro-neptune is only mentioning kedro>=0.17.0

Traceback

Traceback (most recent call last): File "/Users/guemues/.env/ltvsim-3.10/lib/python3.10/site-packages/kedro/framework/cli/utils.py", line 335, in load_entry_points entry_point_commands.append(entry_point.load()) File "/Users/guemues/.env/ltvsim-3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 2450, in load return self.resolve() File "/Users/guemues/.env/ltvsim-3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 2456, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/Users/guemues/.env/ltvsim-3.10/lib/python3.10/site-packages/kedro_neptune/init.py", line 49, in from kedro_neptune.config import get_neptune_config File "/Users/guemues/.env/ltvsim-3.10/lib/python3.10/site-packages/kedro_neptune/config.py", line 20, in from kedro.framework.session import KedroSession, get_current_session ImportError: cannot import name 'get_current_session' from 'kedro.framework.session' (/Users/guemues/.env/ltvsim-3.10/lib/python3.10/site-packages/kedro/framework/session/init.py)

Environment

Package                Version
---------------------- -----------
aiobotocore            2.1.2
aiohttp                3.8.1
aioitertools           0.10.0
aiosignal              1.2.0
anyconfig              0.10.1
APScheduler            3.6.3
arrow                  1.2.2
async-timeout          4.0.2
attrs                  21.4.0
binaryornot            0.4.4
boto3                  1.20.24
botocore               1.23.24
bravado                11.0.3
bravado-core           5.17.0
cachetools             4.2.2
certifi                2021.10.8
chardet                4.0.0
charset-normalizer     2.0.12
click                  8.1.2
clickhouse-driver      0.2.3
clickhouse-sqlalchemy  0.2.0
cmdstanpy              1.0.1
cookiecutter           1.7.3
dynaconf               3.1.7
et-xmlfile             1.1.0
fqdn                   1.5.1
frozenlist             1.3.0
fsspec                 2022.1.0
future                 0.18.2
gitdb                  4.0.9
GitPython              3.1.27
idna                   3.3
isoduration            20.11.0
Jinja2                 3.0.3
jinja2-time            0.2.0
jinjasql               0.1.8
jmespath               0.10.0
jsonpointer            2.2
jsonref                0.2
jsonschema             4.4.0
kedro                  0.18.0
kedro-neptune          0.0.8
MarkupSafe             2.1.1
monotonic              1.6
msgpack                1.0.3
multidict              6.0.2
neptune-client         0.15.2
numpy                  1.22.3
oauthlib               3.2.0
openpyxl               3.0.9
packaging              21.3
pandas                 1.4.2
pep517                 0.12.0
Pillow                 9.1.0
pip                    22.0.4
pip-tools              6.5.1
pluggy                 1.0.0
poyo                   0.5.0
psutil                 5.9.0
psycopg2               2.9.3
PyJWT                  2.3.0
pyparsing              3.0.7
pyrsistent             0.18.1
python-dateutil        2.8.2
python-json-logger     2.0.2
python-slugify         6.1.1
python-telegram-bot    13.11
pytz                   2022.1
pytz-deprecation-shim  0.1.0.post0
PyYAML                 5.4.1
requests               2.27.1
requests-oauthlib      1.3.1
rfc3339-validator      0.1.4
rfc3987                1.3.8
rope                   0.21.1
ruamel.yaml            0.17.10
s3fs                   2022.1.0
s3transfer             0.5.2
setuptools             57.0.0
simplejson             3.17.6
six                    1.16.0
smmap                  5.0.0
SQLAlchemy             1.4.34
statsd                 3.3.0
swagger-spec-validator 2.7.4
text-unidecode         1.3
toml                   0.10.2
tomli                  2.0.1
toposort               1.7
tornado                6.1
tqdm                   4.64.0
typing_extensions      4.1.1
tzdata                 2022.1
tzlocal                4.2
ujson                  5.1.0
uri-template           1.2.0
urllib3                1.26.9
webcolors              1.11.1
websocket-client       1.3.2
wheel                  0.36.2
wrapt                  1.14.0
xlrd                   2.0.1
yarl                   1.7.2

The operating system you're using: apple silicon macbook The output of python --version: Python 3.10.3

pkasprzyk commented 2 years ago

@guemues thanks for the detailed report! You are right, Kedro 0.18 version has some breaking changes compared to 0.17 -- and we are in the process of updating our integration to match. For now, 0.17 should work fine.

pkasprzyk commented 2 years ago

@guemues we've just released a 0.10.0 version which supports current kedro version. I'm closing this issue for now, but don't hesitate to reach out if you encounter any problems.