Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[JOSS Review] Pipeline example not working #269

Open
5 tasks done
gomezzz opened this issue Mar 20, 2024 · 4 comments
Open
5 tasks done

[JOSS Review] Pipeline example not working #269

gomezzz opened this issue Mar 20, 2024 · 4 comments

Comments

@gomezzz
Copy link

gomezzz commented Mar 20, 2024

The minimal example on pipelines is not working for me.

  • There seem to be stray >> in the example.
  • I believe it requires sklearn and dask which you might want to mention in the description.
  • There is a typo in the import of RandomForestClassifier
  • After fixing all of the above I receive
    search_space = pipeline.search_space(parser=...)
                   ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'search_space'
  • config seems to be undefined

(opened as part of JOSS Review openjournals/joss-reviews#6367 )

@eddiebergman
Copy link
Contributor

eddiebergman commented Mar 20, 2024

I fixed the example, many thanks. I'm surprised this was broken. Unfortunatly the README is the few places we can't automatically run code samples. The main documentation's code is tested in CI to ensure it runs correctly :)

The issue was actually a stray , (comma), giving back two objects.

The issue with dask was a bad import that came from the wrong place.

I've fixed both in this PR so many thanks for finding these, hopefully you can copy and paste the example (with sklearn installed).


As a side note, the dask parts of AMLTK are all optional which is a re-occuring pattern for quite a few integrations. This is not the first time an import accidentally escaped. Would you have any suggestions on ensuring this with CI?

@gomezzz
Copy link
Author

gomezzz commented Mar 26, 2024

Hi @eddiebergman ,

trying to run the example from #270 I now receive

  .../envs/amltk/lib/python3.11/site-packages/amltk/pipeline/parsers/configspace.py", line 146, in <module>
    from ConfigSpace import Categorical, ConfigurationSpace, Constant
ModuleNotFoundError: No module named 'ConfigSpace'

@eddiebergman
Copy link
Contributor

Aye, that would need to be installed, as referenced in another issue, it's an entirely optional dependancy (but required with SMAC).

One option would be pip install ConfigSpace or pip install amltk[smac] which installs all the optional dependacies for the smac optimizer.

The other option would be to use pip install amltk[optuna] and use the Optuna optimizer instead.


I guess the main issue that needs to be addressed here is including a comment or something that mentions what dependancies are needed for which example.

@gomezzz
Copy link
Author

gomezzz commented Apr 5, 2024

Yes, works now with the deps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants