文件历史

提交图

104 次代码提交

作者 SHA1 备注 提交日期
Hui Wen 6aaee8332b Create new cleanlab.models module (#601)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2023-02-07 10:03:32 -08:00
Ulyana c191d8781d Fix format compatibility with latest black==23. release (#620) 2023-02-07 10:01:45 -08:00
Jonas Mueller 6ed61e0bb3 cap black version in CI (#618) 2023-02-02 01:13:59 -08:00
Jonas Mueller 9f655a7f6a remove slash at end (#606) 2023-01-19 21:04:56 -05:00
Jonas Mueller b9b981dc01 add cleanlab/projects to ignored URLs check list 2023-01-19 20:57:56 -05:00
Ulyana 7caed93784 Update github actions (#589)
update: github actions to v3, codecov to v3, setup-python to v4, setup node v2 to v3, setup cache v2 to v3
2023-01-05 21:42:34 -08:00
Jonas Mueller 2c69094da1 drop python 3.6 from CI (#577)
followup PR will remove mentions of 3.6 support
2022-12-28 14:40:56 -08:00
Hui Wen d62fad78a6 Fix text tutorial, use GBM model in tabular tutorial (#565)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-12-13 13:11:11 -08:00
Elías Snorrason 0a3344726f chore: 🔥 remove .pylintrc (#564)
flake8 should be used instead
2022-12-13 00:58:22 -08:00
Anish Athalye 0e4e38a9ef Add back testing Python 3.6 (#562)
If we want to continue supporting Python 3.6 (as we claim in the
README), we should make sure we keep testing with it.
2022-12-11 17:57:23 -08:00
Hui Wen d7723d5159 change nblint to gh actions (#560) 2022-12-09 00:41:41 -08:00
Jonas Mueller 7b1946e75b remove python 3.6 testing in CI (#558) 2022-12-06 13:29:45 -08:00
Anish Athalye ecefdbf3d6 Switch CI cron schedule (#548)
Previously, the CI cron schedule, copy-pasted from a personal project,
ran jobs at 8am UTC (3am EST or 4am EDT) on Saturday. This isn't a great
time to get emails about CI breakages.

This patch switches the schedule so it runs on Monday morning (7am EST /
8am EDT).

[skip ci]
2022-11-26 14:43:55 +00:00
Anish Athalye 91b5b40ff7 Move mypy configuration to config file (#545)
This patch moves the `--allow-redefinition` into the `.mypi.ini` file.
Centralizing our mypy config in a single file makes sense, and this way,
if people want to run mypy locally, they don't need to remember to
supply this command-line argument.
2022-11-26 08:07:38 -05:00
Jonas Mueller 6d8c611fe7 ask for runnable code in Help issue template 2022-11-19 15:55:14 -08:00
Jonas Mueller 0727a7da4d github actions with TF_CPP_MIN_LOG_LEVEL = 3 (#536)
set environ variable TF_CPP_MIN_LOG_LEVEL = 3 to suppress unnecessary tensorflow prints when building tutorials on github server
2022-11-15 14:11:17 -08:00
Ilnar 10abd7d191 replace pylint --> flake8 in CI (#531)
* add flake8 configuration in setup.cfg
2022-11-08 16:08:57 +00:00
Jonas Mueller 9da372bb4d typecheck with python v3.10 (#521)
Thanks @huiwengoh for diagnosing this problem!
2022-11-03 23:17:41 -07:00
Ulyana a6d71bf2a0 CI: check cleanlab imports without optional dependencies installed (#470)
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2022-09-29 13:06:43 -07:00
Mohit Saxena 57adf33369 Adding pylint CI checks (#465)
* Update ci.yml

* remove unused import

* 💚 merge pylint jobs

* 🔧 add .pylintrc

* 🚨 handle pylint errors

Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2022-09-23 16:10:03 +00:00
Anish Athalye f7e01ed382 Fix docs build in CI (#462)
This patch pins the Pandoc version to a more recent release (2.19.2).

As explained in d8cc2e5056, nbconvert
translates Markdown -> reST -> HTML, and it uses Pandoc for this
Markdown -> reST conversion. Older versions of Pandoc don't do a
high-fidelity conversion; in particular, they don't have great support
for mixed Markdown/HTML content.

Consider the following Markdown, the core of how we use the details
disclosure element in several tutorial notebooks:

    <details><summary>Summary</summary>

    Body.

    </details>

Using Pandoc 2.19.2, this converts to the following reST:

    .. raw:: html

       <details>

    .. raw:: html

       <summary>

    Summary

    .. raw:: html

       </summary>

    Body.

    .. raw:: html

       </details>

This is a correct conversion. However, using Pandoc 2.5, which is the version
of Pandoc that was being used by CI prior to this patch (the version of Pandoc
available in the package repository for Ubuntu 20.04), it converts as follows:

    .. raw:: html

       <details>

    Summary

    Body.

    .. raw:: html

       </details>

The <summary> tag is lost in this conversion.

This patch switches to a more recent version of Pandoc to fix this issue.
2022-09-16 19:29:48 -07:00
Elías Snorrason cdf6a147af ignore links to pradyunsg when validating HTML (#446) 2022-09-15 15:21:12 -07:00
Jonas Mueller a4ad6460a2 Format return docstrings and add typing (#437)
* typing and return docstrings

* address typing complaints

* allow redefinition

* typing complains for pandas

* .values -> to_numpy()
2022-09-15 11:46:14 +00:00
Elías Snorrason 0b5a089e37 fix typos in ci step names (#377)
[skip ci]
2022-08-24 09:01:20 -07:00
Jonas Mueller b93fdebf30 Add compatibility for tensorflow and pytorch Dataset objects (#311)
* validation_func docstring

* torch,tf compatibility+tests

* keras test

* skip tests if python < 3.7

* pytorch numpy int bug on windows

* make tensorflow test work on windows

* move tf env variable setting

* pytorch test increase epochs

* install cpu-tensorflow on windows CI

* torch test optimizer to adam

* fix bugs in shuffled TF dataset

* dummy unit test for TF on windows

* dummy code for TF windows testing

* deal with np.int bug on windows

* remove windows debugging code

* docstrings for new functionality

* address merge conflicts

* reformat after merge

* addressed comments
2022-07-27 21:42:13 -07:00
Jonas Mueller ffbe47835e update slack link (#313)
* update slack link

* slack links in docs

* slack link in ISSUE_TEMPLATE
2022-07-20 18:31:39 -07:00
Anish Athalye 0705ff2d0a Add static type checking
Our package doesn't have type annotations everywhere, so we can't use
mypy in strict mode just yet. Still, adding type checking in CI is
valuable, so we don't have unchecked annotations in our code.

This patch includes basic fixes to make type checking pass, including
switching the incorrect `np.array` type annotation for `np.ndarray` and
adding some assertions for flow-sensitive typing.
2022-07-06 17:21:56 -04:00
Jonas Mueller b970496a0f update slack invite link (#280)
* update slack invite link
2022-06-19 15:08:10 -07:00
Anish Athalye 07c8ce655d Add issue templates (#278) 2022-06-14 14:49:18 -07:00
Wei Jing 4aab0b0a56 create latest_release.txt file (#231) 2022-05-19 02:26:46 -07:00
Anish Athalye 6cb23afa1f Fix link checking (#257)
For some reason, GitHub is returning a 403 to the GitHub actions runner
when it tries to access these URLs. Maybe docs.github.com doesn't allow
access from GitHub actions.
2022-05-12 20:07:09 -07:00
Wei Jing Lok 31d2f2dbd7 add condition to deploy if ref_type is tag 2022-04-16 23:17:48 +08:00
Anish Athalye bf8e82d4bf Add support for LaTeX math in documentation 2022-04-09 07:33:24 -04:00
Anish Athalye 35fdebb211 Merge branch 'anishathalye/docs-link-checking' 2022-04-07 15:23:07 -04:00
Anish Athalye 8de8340313 Add link checking for compiled docs 2022-04-07 10:33:15 -04:00
Anish Athalye 6e09aee751 Add link checking for all Markdown files 2022-04-07 10:18:46 -04:00
Wei Jing Lok dded28c58c uncomment line that deploys docs if trig by master 2022-04-06 19:05:50 +08:00
Anish Athalye 6cac342613 Add CI check that .ipynb outputs are empty
Preserving the output cells in Jupyter notebooks that are checked in to
this repo bloat the repo size, and keeping the output is not necessary
because the notebooks are run as part of the CI for producing docs.

For example, in https://github.com/cleanlab/cleanlab/pull/165, the
`audio.ipynb` is 112K (and now part of the repo history forever), while
clearing the output cells reduces that size down to 24K. I suspect that
Git's delta compression will also work better without the output cells
there as we make changes to the notebook. Also, the diffs will be more
readable.
2022-04-05 08:15:54 -04:00
Anish Athalye c73336cb3a Merge branch 'development-guide' 2022-04-03 19:53:50 -04:00
Anish Athalye 9101b85e68 Add development guide
This patch also adds a pre-commit hook that runs Black.
2022-04-03 19:31:05 -04:00
Anish Athalye 78c30b04f7 Add Python 3.10 to CI 2022-04-03 14:22:49 -04:00
Wei Jing Lok 034eb80061 Change .ipynb files to use master ver of cleanlab 2022-03-27 17:45:05 +08:00
Wei Jing Lok da686a4006 update doc toc for 2.0 2022-03-24 03:28:14 +08:00
Wei Jing aca683ec80 Add image classification tutorial and streamline docs CI/CD (#127) 2022-03-22 19:34:27 -04:00
Anish Athalye 11dff1faf4 Standardize code style to Black (#107)
* Set up Black as the code style

* Migrate code style to Black
2022-03-16 21:27:36 -04:00
Curtis G. Northcutt 8f9f3f5380 Major API change. Introducing Cleanlab 2.0 (#128)
* Refactor modules pruning to filter and latent_estimation to count

* Remove polyplex (research) algorithms from cleanlab

* Create new module rank and move scoring functions to rank.

* Rename test to match new module names

* Fixed error in normalized margin. added ranking for arbitrary psx and labels.

* Remove unused tests and methods. add multi-label support for baseline.

* Move baseline methods to filter and delete baseline module.

* change filter.get_noise_indices to filter.find_label_issues

* Rename baseline methods. fill out docstrings.

* Only require 1 example to be left in each class after removing errors. (instead of 5)

* Remove K as a parameter to count.compute_confident_joint

* Add C_argmax and C_ij methods from CL paper to find_label_issues

* Add warnings for new prune methods and frac_noise. Fix tests.

* Add baseline tests to test_rank_filter and delete baseline test

* Remove inverse_noise_matrix parameter in classification call to find_label_issues

* add todo to update docstring with new ranking functions

* 100% tests pass. add multi-label support for prune_method

* Major NOT-backwards-compatible name changes to most components

* More Major NOT-backwards-compatible name changes

* fixed s -> label mistakes

* Several nomenclature updates from PR feedback. models renamed to example models.

* Remove python2 support across all modules.

* major api changes. psx -> pred_probs. prob_given_label -> self_confidence. testing added.

* enable python version 3.9 for pytorch model.

* ran spellcheck

* ran grammar check

* Update count.py

* Update filter.py

* Update setup.py and ci.yml to no longer support Python 2 and py3.4/5

* Increase test coverage and documentation of rank module methods.

* create utils submodule and move util and latent_algebra

* Rename y everywhere to true_labels, and p(true_label=..)

* Enforce positional arguments in methods. Fully remove py2 support.
2022-03-16 06:52:03 -04:00
Wei Jing Lok 6169fdcd43 Add new documentation site 2022-03-01 14:55:51 -05:00
Anish Athalye e27a050236 Remove requirements.txt
This was duplicating content in setup.py (and the two had gotten out of
sync, listing different versions for scipy).

According to the Python Packaging User Guide
(https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/),
the `install_requires` specifies what a project minimally needs to run
correctly, while the requirements.txt file contains an exhaustive list
of pinned versions for the purpose of repeatable installations of a
complete environment. Cleanlab is a Python package that users will `pip
install`, so we don't need a requirements.txt.

Some related projects like scikit-learn don't have a requirements.txt,
and others that do have such a file use it for a different purpose, e.g.
PyTorch and Keras use the file to list dev dependencies.
2022-02-16 14:18:33 -05:00
Anish Athalye f71cb3b4d0 Ban coverage>=6.3
See https://github.com/nedbat/coveragepy/issues/1312. We can revert this
commit once a newer version of coverage fixes this issue.

coverage==6.3.1
(https://github.com/nedbat/coveragepy/issues/1310#issuecomment-1027499386)
doesn' t fully fix the issue either; hangs become less frequent but are
not eliminated (see e.g. this run of our tests with coverage==6.3.1:
https://github.com/cleanlab/cleanlab/runs/5036277812?check_suite_focus=true).
2022-02-02 07:25:29 -05:00
Anish Athalye ea78f62a8e Run tests on pull request 2022-01-10 06:10:37 -05:00