文件历史

提交图

22 次代码提交

作者 SHA1 备注 提交日期
Gibson Han e90dea60c7 702 - Shorten Refs of classes and functions (#831)
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
Co-authored-by: tataganesh <tataganesh95@gmail.com>
2023-12-07 13:37:16 +00:00
Elías Snorrason 4ce9f771c8 Unify softmax implementations (#826)
* unify softmax implementations

* Refine mypy type hint in _set_fine_search_range function

- Update type hint for `min_entropy_ind` from built-in `int` to `np.intp`.
  - This refinement addresses a type compatibility warning.
  - `np.intp` is the integer type used by numpy for indexing and can differ in size from the built-in Python `int` depending on the platform (32-bit vs 64-bit).
  - Mypy highlighted this type hint discrepancy.

* add unit tests for softmax

---------

Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
2023-08-30 00:22:05 +00:00
Tata Ganesh d37a7d8d85 Expose low memory option for token and multi-label classification (#822) 2023-08-23 01:14:29 -04:00
Jonas Mueller d5e81f0c6d allow for kwargs in token find_label_issues (#686) 2023-04-28 10:28:39 -07:00
Ulyana d45a508ed6 Update softmax to be more numerically stable (#667) 2023-04-14 22:23:40 -05:00
Aditya Thyagarajan 7b589f6d63 updating copyright year to include 2023 (#594) 2023-01-06 21:25:57 -08:00
Jonas Mueller fdfb029001 clarify thresholding in issues_from_scores (#582) 2023-01-06 08:55:42 -08:00
Jonas Mueller a222859569 Improve docs in label error detection methods for classification data + filter/count mypy type annotations (#543) 2022-11-23 23:01:36 -08:00
Jonas Mueller 00781ce984 update paper links (#503)
Co-authored-by: huiwengoh <45724323+huiwengoh@users.noreply.github.com>
2022-10-18 00:01:00 -07:00
Ulyana 72c4297c16 Update __init__.py to include major files (#490)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-10-05 17:41:13 -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
Jonas Mueller 32f7319da9 fix return type of token classification get_label_quality_scores [include in 2.1 docs] 2022-09-22 14:40:18 -07:00
Jonas Mueller 7256cd3546 More improvements to token classification code and documentation (#452)
* improved token docs/code

* format paragraphs in docstrings

* fix typo

Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2022-09-16 14:04:45 +00:00
Elías Snorrason bc2dabb764 Change output of display_issues (#450) 2022-09-15 18:05:46 -07:00
Elías Snorrason 95b0742342 Make softmin_sentence_score a private function (#449)
This scoring function is only used internally. Might as well be private.
2022-09-15 23:19:15 +00:00
Elías Snorrason fd50f6b9c6 Deploy docs for token classification module (#438)
* docs: 📝 add usage example for get_sentence

Also remove types in docstrings.

* docs: 📝 add usage examples for filter_sentence

* docs: 📝 add page for internal.token_classification_utils

* docs: 📝 remove name of return variable

auto-tagging won't work correctly for the return value if it's not a tuple

* 📝 add pages for modules in cleanlab.token_classification

* fix indentation

* 📝 add token classification api to toctree

* 🎨 format docstrings

* 📝 add usage examples

* update example comment

* 📝 add usage examples

* 📝 add return variable name in docstring

* 📝 remove some hard-coded params types in rank module

Keep more complex parameters hard-coded for now. E.g. "enum"-like parameters.

* 🎨 remove indentation of parameters in docstrings

* 🎨 fix indentation

* colored docstring typo + formatting

* typo: occurence

* probs_merged docstring typo + formatting

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-09-14 14:59:26 -07:00
Elías Snorrason 9a109182b1 Update argument given_labels -> labels in token classification module (#423)
* given_labels -> labels

only applies to the argument to `display_issues`

Fixes #418

* update kwargs in test for display_issues

* apply black formatter
2022-09-11 12:38:38 -07:00
Jonas Mueller 23067aa9c6 Headers for newly added modules (#409)
* header for multiannotator module

* header for outlier module

* header for token_classification.filter

* header for token_classification.rank

* header for token_classification.summary

* header for util

* header for latent_algebra

* header for label_quality_utils

* header for token_classification_utils

* header for huggingfacekerasclassifier

* add experimental modules' dependencies to readme
2022-09-08 09:20:26 -07:00
Elías Snorrason 9f030a65ac Cleanup-summary (#396)
* 🎨 remove wildcard imports

* 🏷️ review type annotations in display_issues

Restrict nested lists with `List`. Keep unrestricted lists as `list`. Remove hard-coded tags from docstrings, should be auto-tagged in later PR.

* ♻️ use `isinstance` for type-check at runtime

* 🏷️ review type annotations in common_label_issues and filter_by_token

Remove hard-coded tags in docstrings. Should be auto-tagged in later PR.

*  improve test coverage of display issues

No part of the function is easily testable except ensuring it completes exection. Some parts handle edge cases that were never reached during testing.

*  parametrize tests for coverage on common_label_issues and filter_by_token
2022-09-05 17:21:26 -07:00
Elías Snorrason afa217cb4a Fix typing for find_label_issues (#391) 2022-09-03 12:30:07 -07:00
Elías Snorrason c884dc5171 Cleanup token_classification.rank module (#393)
*  add test fixture for get_label_quality_scores

*  test softmin_sentence_score

include test cases for temperature limits

* ♻️ cleanup softmin_sentence_score

Remove unused keyword-only args, Fix tag in docstring, Change format of nested functions.

*  specialize edge-case temperature=inf in softmin_sentence_score

* ♻️ simplify temperature lookup

* ♻️ cleanup get_label_quality_scores

Remove unused args/variables. Update parameter list in docstring. Rename parameter of inner function. Function always returns a tuple.

* 🏷️ tag token_scores as optional

*  test raised error

* 🩹 skip untestable elif statement

the elif statement only gets partial coverage because it can't evaluate to False due to the `assert sentence_score_method` at the start of the function
2022-09-02 18:26:07 -07:00
Eric Wang 1bad2f82a2 Adding functionality for cleanlab to find label errors in token classification datasets (#347)
* add token_classification functionality

* add typing

* fix typing

* add typing

* fixed typing and black

* fix typing
2022-08-30 09:17:07 -07:00