Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Demonstration code results in an error #185

Open
Checkpoint-89 opened this issue Nov 27, 2024 · 0 comments
Open

Demonstration code results in an error #185

Checkpoint-89 opened this issue Nov 27, 2024 · 0 comments

Comments

@Checkpoint-89
Copy link

Description of the bug: the following code results in an error

from melusine.data import load_email_data
from melusine.pipeline import MelusinePipeline

# Load an email dataset
df = load_email_data()

# Load a pipeline
pipeline = MelusinePipeline.from_config("expeditor_pipeline")  

# Run the pipeline
df = pipeline.transform(df)

This is the same code as here but where "demo_pipeline" has been replaced by "expeditor_pipeline".

KeyError                                  Traceback (most recent call last)
Cell In[1], [line 8](vscode-notebook-cell:?execution_count=1&line=8)
      [5](vscode-notebook-cell:?execution_count=1&line=5) df = load_email_data()
      [7](vscode-notebook-cell:?execution_count=1&line=7) # Load a pipeline
----> [8](vscode-notebook-cell:?execution_count=1&line=8) pipeline = MelusinePipeline.from_config("expeditor_pipeline")  
     [10](vscode-notebook-cell:?execution_count=1&line=10) # Run the pipeline
     [11](vscode-notebook-cell:?execution_count=1&line=11) df = pipeline.transform(df)

File d:\Users\cdiet\Program\miniconda3\envs\c3po\lib\site-packages\melusine\pipeline.py:197, in MelusinePipeline.from_config(cls, config_key, config_dict, **kwargs)
    [195](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:195) if config_key and not config_dict:
    [196](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:196)     raw_config_dict = config[config_key]
--> [197](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:197)     config_dict = cls.parse_pipeline_config(raw_config_dict)
    [199](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:199) elif config_dict and not config_key:
    [200](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:200)     config_dict = cls.parse_pipeline_config(config_dict)

File d:\Users\cdiet\Program\miniconda3\envs\c3po\lib\site-packages\melusine\pipeline.py:334, in MelusinePipeline.parse_pipeline_config(cls, config_dict)
    [332](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:332)     _ = step.pop(cls.OBJ_KEY)
    [333](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:333)     # Update step parameters
--> [334](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:334)     step[cls.OBJ_PARAMS] = config[config_key]
    [336](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:336) # Nested pipeline
    [337](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/site-packages/melusine/pipeline.py:337) if step[cls.OBJ_CLASS] == cls.__name__:

File d:\Users\cdiet\Program\miniconda3\envs\c3po\lib\collections\__init__.py:1106, in UserDict.__getitem__(self, key)
   [1104](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/collections/__init__.py:1104) if hasattr(self.__class__, "__missing__"):
   [1105](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/collections/__init__.py:1105)     return self.__class__.__missing__(self, key)
-> [1106](file:///D:/Users/cdiet/Program/miniconda3/envs/c3po/lib/collections/__init__.py:1106) raise KeyError(key)

KeyError: 'expeditor_detector'

Debug Information

Please write the debug information inside ``` quotes in order to prevent text interpretation by the text editor.

Operating System: (run cat /etc/os-release in a terminal if running on a GNU/Linux distribution)

Microsoft Windows [Version 10.0.22631.4460]

Python version: (run python --version in the environment running Melusine)

Python 3.10.15

Melusine version: (run pip freeze |grep melusine in your Python environment)

melusine                  3.1.0                    pypi_0    pypi

Python packages: (run pip freeze in your Python environment)

annotated-types @ file:///home/conda/feedstock_root/build_artifacts/annotated-types_1716290248287/work
antlr4-python3-runtime==4.9.3
anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1728935693959/work
anytree==2.12.1
arrow==1.3.0
asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1698341106958/work
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1722977137225/work
blis @ file:///D:/bld/cython-blis_1729663834586/work
Brotli @ file:///D:/bld/brotli-split_1725267609074/work
catalogue @ file:///D:/bld/catalogue_1695626473778/work
certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1725278078093/work/certifi
cffi @ file:///D:/bld/cffi_1725560649097/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1728479282467/work
click @ file:///D:/bld/click_1692312014553/work
cloudpathlib @ file:///home/conda/feedstock_root/build_artifacts/cloudpathlib-meta_1729359055183/work
colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1666700638685/work
comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1710320294760/work
confection @ file:///D:/bld/confection_1701179276886/work
contourpy @ file:///D:/bld/contourpy_1731428338157/work
cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1696677705766/work
cymem @ file:///D:/bld/cymem_1732329423485/work
debugpy @ file:///D:/bld/debugpy_1732236678331/work
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work
distro @ file:///home/conda/feedstock_root/build_artifacts/distro_1704321475663/work
exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1720869315914/work
executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1725214404607/work
faiss==1.8.0
fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1718477020893/work/dist
fonttools @ file:///D:/bld/fonttools_1731643410328/work
h11 @ file:///home/conda/feedstock_root/build_artifacts/h11_1664132893548/work
h2 @ file:///home/conda/feedstock_root/build_artifacts/h2_1634280454336/work
hpack==4.0.0
httpcore @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_httpcore_1731707562/work
httpx @ file:///home/conda/feedstock_root/build_artifacts/httpx_1724778349782/work
hyperframe @ file:///home/conda/feedstock_root/build_artifacts/hyperframe_1619110129307/work
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1726459485162/work
importlib_metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1726082825846/work
importlib_resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1725921340658/work
ipykernel @ file:///D:/bld/ipykernel_1719845595208/work
ipython @ file:///D:/bld/ipython_1729866374643/work
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1731317204262/work
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1715127149914/work
jiter @ file:///D:/bld/jiter_1732672330884/work
joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1714665484399/work
jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema_1720529478715/work
jsonschema-specifications @ file:///tmp/tmpvslgxhz5/src
jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1726610684920/work
jupyter_core @ file:///D:/bld/jupyter_core_1727163532151/work
kiwisolver @ file:///D:/bld/kiwisolver_1725459382062/work
langcodes @ file:///home/conda/feedstock_root/build_artifacts/langcodes_1732116812595/work
language_data @ file:///home/conda/feedstock_root/build_artifacts/language-data_1732032415021/work
marisa-trie @ file:///D:/bld/marisa-trie_1728409761391/work
markdown-it-py @ file:///home/conda/feedstock_root/build_artifacts/markdown-it-py_1686175045316/work
MarkupSafe @ file:///D:/bld/markupsafe_1729351293186/work
matplotlib==3.9.2
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1713250518406/work
mdurl @ file:///home/conda/feedstock_root/build_artifacts/mdurl_1704317613764/work
melusine==3.1.0
munkres==1.1.4
murmurhash @ file:///D:/bld/murmurhash_1728933128436/work
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1712238998817/work
nest_asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1705850609492/work
numpy @ file:///D:/bld/numpy_1691056618426/work
omegaconf==2.3.0
openai @ file:///home/conda/feedstock_root/build_artifacts/openai_1732571410491/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1731802491770/work
pandas @ file:///D:/bld/pandas_1726878561601/work
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1712320355065/work
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work
pillow @ file:///D:/bld/pillow_1726075253811/work
pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1694617248815/work
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1726613481435/work
plotly @ file:///home/conda/feedstock_root/build_artifacts/plotly_1726179518483/work
preshed @ file:///D:/bld/preshed_1728945788471/work
prompt_toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1727341649933/work
psutil @ file:///D:/bld/psutil_1729847160832/work
pure_eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1721585709575/work
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1711811537435/work
pydantic @ file:///home/conda/feedstock_root/build_artifacts/pydantic_1732689372589/work
pydantic_core @ file:///D:/bld/pydantic-core_1732253897811/work
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1714846767233/work
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1728880423364/work
PySide6==6.8.0.2
PySocks @ file:///D:/bld/pysocks_1661604991356/work
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1731919281354/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1706886791323/work
pywin32==307
PyYAML==6.0.2
pyzmq @ file:///D:/bld/pyzmq_1728642398422/work
referencing @ file:///home/conda/feedstock_root/build_artifacts/referencing_1714619483868/work
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1717057054362/work
rich @ file:///home/conda/feedstock_root/build_artifacts/rich_1730592237829/work/dist
rpds-py @ file:///D:/bld/rpds-py_1730922630751/work
scikit-learn @ file:///D:/bld/scikit-learn_1726082855864/work/dist/scikit_learn-1.5.2-cp310-cp310-win_amd64.whl#sha256=f8a2b0c9a97f54c5c064931b1b27e9443957ccd063bc8c437288596a61b2bd5d
scipy @ file:///C:/bld/scipy-split_1729480777186/work/dist/scipy-1.14.1-cp310-cp310-win_amd64.whl#sha256=0bd1a786f4784f64d7038cb496e376c7aee37fd463d42853dbee10be0eb97a75
shellingham @ file:///home/conda/feedstock_root/build_artifacts/shellingham_1698144360966/work
shiboken6==6.8.0.2
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
smart_open @ file:///home/conda/feedstock_root/build_artifacts/smart_open_1728143129233/work/dist
sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1708952932303/work
spacy @ file:///D:/bld/spacy_1732449855136/work
spacy-legacy @ file:///home/conda/feedstock_root/build_artifacts/spacy-legacy_1674550301837/work
spacy-loggers @ file:///home/conda/feedstock_root/build_artifacts/spacy-loggers_1694527114282/work
srsly @ file:///D:/bld/srsly_1695654140438/work
stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1669632077133/work
tenacity @ file:///home/conda/feedstock_root/build_artifacts/tenacity_1722278858289/work
thinc @ file:///D:/bld/thinc_1732441608303/work
threadpoolctl @ file:///home/conda/feedstock_root/build_artifacts/threadpoolctl_1714400101435/work
tornado @ file:///D:/bld/tornado_1732615925919/work
tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1732497199771/work
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1713535121073/work
treelib==1.7.0
typer==0.13.1
typer-slim==0.13.1
types-python-dateutil==2.9.0.20241003
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1717802530399/work
tzdata @ file:///home/conda/feedstock_root/build_artifacts/python-tzdata_1727140567071/work
unicodedata2 @ file:///D:/bld/unicodedata2_1729704580516/work
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1726496430923/work
wasabi @ file:///D:/bld/wasabi_1715409731580/work
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1704731205417/work
weasel @ file:///home/conda/feedstock_root/build_artifacts/weasel_1719987001521/work
win_inet_pton @ file:///D:/bld/win_inet_pton_1727796272493/work
wrapt @ file:///D:/bld/wrapt_1732523626351/work
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1731262100163/work
zstandard==0.23.0
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant