ploomber / sklearn-evaluation

Machine learning model evaluation made easy: plots, tables, HTML reports, experiment tracking and Jupyter notebook analysis.
https://sklearn-evaluation.ploomber.io
Apache License 2.0
455 stars 54 forks source link

Altair CI Fix #337

Closed neelasha23 closed 1 year ago

neelasha23 commented 1 year ago

Describe your changes

Docs build failing because selection_single method of altair deprecated.

Issue number

Closes #X

Checklist before requesting a review


:books: Documentation preview :books:: https://sklearn-evaluation--337.org.readthedocs.build/en/337/

neelasha23 commented 1 year ago

Have solved the altair issue. The selection_single method has been deprecated. Replaced it with selection_point. However this method doesn't accept the init parameter, we need to set default selected quadrant using value. There's some issue with this , and it isn;t clear to me from the docs as to how to pass the initial values. So we can open another issue to tackle this. However, even after solving the altair issue I see some more issues in the build:

TypeError: data must be str, not list

 [mystnb.exec]
/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/checkouts/337/doc/classification/report_comparison.md: WARNING: Notebook exception traceback saved in: /home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/checkouts/337/_readthedocs/html/reports/classification/report_comparison.err.log [mystnb.exec]
/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/checkouts/337/doc/classification/report_evaluation.md: WARNING: Executing notebook failed: CellExecutionError
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/conda/337/lib/python3.10/site-packages/jupyter_cache/executors/utils.py", line 58, in single_nb_execution
    executenb(
  File "/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/conda/337/lib/python3.10/site-packages/nbclient/client.py", line 1305, in execute
    return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
  File "/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/conda/337/lib/python3.10/site-packages/jupyter_core/utils/__init__.py", line 166, in wrapped
    return loop.run_until_complete(inner)
  File "/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/conda/337/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/conda/337/lib/python3.10/site-packages/nbclient/client.py", line 705, in async_execute
    await self.async_execute_cell(
  File "/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/conda/337/lib/python3.10/site-packages/nbclient/client.py", line 1058, in async_execute_cell
    await self._check_raise_for_error(cell, cell_index, exec_reply)
  File "/home/docs/checkouts/readthedocs.org/user_builds/sklearn-evaluation/conda/337/lib/python3.10/site-packages/nbclient/client.py", line 914, in _check_raise_for_error
    raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
report.save("report.html")

Still trying to figure out.

@TegveerG @edublancas

neelasha23 commented 1 year ago

I'm still not sure why this error is coming up. The docs are building fine in my local. Have we seen this error before? Can it be an issue with the readthedocs environment?

@edublancas

edublancas commented 1 year ago

I was able to reproduce this. the docs logs are a bit hard to read because of the ansi color codes, but the problem is in the report.py file. we're using mistune to export the file and version 3 just came out. if you install mistune 3 and run report_comparison, you'll be able to reproduce the error. should be a quick fix to support mistune 3

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5289901575


Totals Coverage Status
Change from base Build 4674524329: 0.0%
Covered Lines: 3557
Relevant Lines: 3878

💛 - Coveralls
coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5289120934


Totals Coverage Status
Change from base Build 4674524329: 0.0%
Covered Lines: 3557
Relevant Lines: 3878

💛 - Coveralls
neelasha23 commented 1 year ago

Made changes for supporting latest versions of mistune and altair. There's a formatting issue (not able to pass the default selected quadrant because init parameter no more supported, it is replaced with value and I'm not finding proper documentation) with the interactive confusion matrix which I haven't been able to solve yet. but it's not affecting the CI.

There's also some long html outputs in the reports but I see those in the master branch as well : https://sklearn-evaluation.ploomber.io/en/latest/classification/report_evaluation.html

@edublancas