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

Change cleanlab version in Image Tutorial #138

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

weijinglok
Copy link
Contributor

@weijinglok weijinglok commented Mar 25, 2022

This PR introduces:

  1. Updated Image Tutorial using cleanlab's latest API (AKA the upcoming v2.0.0 API)
  2. Additional steps and conditions in the CI workflow (gh-pages.yaml) to dynamically install different versions of cleanlab in the .ipynb notebooks based on whether it is triggered by a push to master branch or a new release.
  3. The Colab hyperlink in the tutorial will now link to the executed version of the notebook from the cleanlab-docs repo.
  4. Fix the cannot import name 'escape' from 'jinja2' issue.

@weijinglok weijinglok marked this pull request as draft March 25, 2022 18:09
@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #138 (6ee01b6) into master (c50836c) will decrease coverage by 0.39%.
The diff coverage is n/a.

❗ Current head 6ee01b6 differs from pull request most recent head 034eb80. Consider uploading reports for the commit 034eb80 to get more accurate results

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
- Coverage   87.29%   86.89%   -0.40%     
==========================================
  Files          12       11       -1     
  Lines         968      908      -60     
  Branches      175      166       -9     
==========================================
- Hits          845      789      -56     
+ Misses        104      103       -1     
+ Partials       19       16       -3     
Impacted Files Coverage Δ
cleanlab/count.py 93.96% <0.00%> (-0.16%) ⬇️
cleanlab/filter.py 91.77% <0.00%> (ø)
cleanlab/utils/label_quality_utils.py
cleanlab/rank.py 100.00% <0.00%> (+6.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c50836c...034eb80. Read the comment docs.

@weijinglok weijinglok marked this pull request as ready for review March 25, 2022 19:18
@jwmueller
Copy link
Member

need to fix collab version before we merge

docs/source/conf.py Outdated Show resolved Hide resolved
@weijinglok weijinglok force-pushed the fix-img-tut branch 4 times, most recently from 6ee01b6 to f53f66e Compare March 26, 2022 22:46
@@ -48,6 +48,33 @@ jobs:
- name: Install dependencies
run: python3 -m pip install -r docs/requirements.txt

- name: Find and replace "%pip install cleanlab" with master branch in .ipynb files
if: ${{ github.ref_type == 'branch' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this work for when we merge PRs into master also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should. It may look a little odd because there isn't an if...else statement here, so it's just 2 separate if statements - one for when the doc CI is triggered by a push to the master branch, another when it's triggered by a newly published release.

In pseudocode, the above-highlighted code snippet does the following:

  1. If it's triggered by a push to a branch, i.e. the master branch in the cleanlab/cleanlab repo AKA our production repo
  2. find %pip install cleanlab # for colab in the .ipynb files and replace them with pip installing a specific commit hash of cleanlab. For example, if the doc build is run in the cleanlab/cleanlab repo and the merging commit hash is abc123, then the replacement will be:

%pip install git+https://github.com/cleanlab/cleanlab.git@abc123

if this is unnecessarily specific, setting it to download to a specific branch would work too, e.g. something like:

%pip install git+https://github.com/cleanlab/cleanlab.git@master

@jwmueller jwmueller self-requested a review March 27, 2022 16:31
Copy link
Member

@jwmueller jwmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jwmueller jwmueller merged commit 9a3eb36 into cleanlab:master Mar 27, 2022
@weijinglok weijinglok deleted the fix-img-tut branch March 28, 2022 15:44
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

Successfully merging this pull request may close these issues.

None yet

3 participants