Fixes #702: Resolve TypeError in `mapper_quickstart.ipynb` tutorial notebook
Pull Request Description
Summary
This pull request addresses the issue reported in Issue #702 regarding an error encountered when executing the mapper_quickstart.ipynb notebook. The error resulted from compatibility issues between scikit-learn version 1.5.2 and the giotto-tda library.
Problem Statement
The user reported errors stemming from the following snippet in the notebook:
fig = plot_static_mapper_graph(pipe, data)
fig.show(config={'scrollZoom': True})
The detailed traceback indicated a TypeError due to changes in the scikit-learn API that have not been reflected in the ListFeatureUnion class within giotto-tda. The main consequence is an inability to use the notebook seamlessly under the current library conditions.
Actions Taken
Short-term Fix
- Downgraded
scikit-learnfrom version 1.5.2 to 1.3.2, which resolves the immediate error and allows the tutorial to function correctly withgiotto-tdaversion 0.6.2.
Long-term Recommendations
To ensure ongoing compatibility with future versions of scikit-learn, it is recommended that the ListFeatureUnion class in giotto-tda be updated. The key changes should include:
- Adjustments to the parameter routing within the
_parallel_funcmethod. - Modifications to transformer handling to accommodate the new functionalities and parameters introduced in
scikit-learn 1.5.2.
User Guidance
- Users are advised to create a separate virtual environment that includes both
giotto-tdaandscikit-learn 1.3.2to work through the tutorial notebooks, while maintaining their main environment with the updated version ofscikit-learn.
Conclusion
The applied short-term fix enables users to proceed with tutorial usage without encountering errors. Attention from the maintainers is required for long-term updates to ensure compatibility with upcoming changes in scikit-learn.
Fixes #702
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.