Skip to content

Conversation

@desilinguist
Copy link
Collaborator

This PR closes #569.

We are only doing part of the issue here (the renaming) but not moving the pos_label field into the Input section from the Tuning section where it currently lives. This is mainly to minimize the amount of changes that someone would need to go through when converting their old code/config files (renaming can be automated).

- The main code, the tests, and the documentation.
@desilinguist desilinguist requested review from a user, Frost45, damien2012eng and mulhod December 8, 2021 22:02
@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #706 (0dd622f) into main (47175c8) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #706   +/-   ##
=======================================
  Coverage   96.89%   96.89%           
=======================================
  Files          63       63           
  Lines        9199     9199           
=======================================
  Hits         8913     8913           
  Misses        286      286           
Impacted Files Coverage Δ
skll/learner/voting.py 98.45% <ø> (ø)
tests/test_preprocessing.py 100.00% <ø> (ø)
tests/test_voting_learners_expts_1.py 98.38% <ø> (ø)
tests/test_voting_learners_expts_2.py 98.82% <ø> (ø)
tests/test_voting_learners_expts_3.py 98.82% <ø> (ø)
tests/test_voting_learners_expts_4.py 98.76% <ø> (ø)
tests/test_voting_learners_expts_5.py 98.48% <ø> (ø)
skll/config/__init__.py 95.13% <100.00%> (ø)
skll/experiments/__init__.py 95.14% <100.00%> (ø)
skll/learner/__init__.py 97.13% <100.00%> (ø)
... and 6 more

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 47175c8...0dd622f. Read the comment docs.


if label_list == ['B', 'C']:
pos_label_str, other_label_str = 'B', 'C'
pos_label, other_label_str = 'B', 'C'
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that this PR is supposed to change only pos_label_str to pos_label but in a couple of other places, I did see neg_label_str being changed to neg_label. Similarly, should other_label_str be changed too?

Copy link

@ghost ghost Dec 9, 2021

Choose a reason for hiding this comment

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

I checked out the branch and grepped all the _label_str and found the following occurrences of other_label_str. Rest looks good to me.

./tests/test_classification.py:252:        pos_label, other_label_str = 'B', 'C'
./tests/test_classification.py:254:        pos_label, other_label_str = 2, 1
./tests/test_classification.py:256:        pos_label, other_label_str = 'FRAG', 'NONE'
./tests/test_classification.py:263:        index_label_dict = {0: other_label_str, 1: pos_label}
./tests/test_classification.py:265:        sorted_label_list = sorted([pos_label, other_label_str])

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, we can do that for consistency. Thanks guys!


if label_list == ['B', 'C']:
pos_label_str, other_label_str = 'B', 'C'
pos_label, other_label_str = 'B', 'C'
Copy link

@ghost ghost Dec 9, 2021

Choose a reason for hiding this comment

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

I checked out the branch and grepped all the _label_str and found the following occurrences of other_label_str. Rest looks good to me.

./tests/test_classification.py:252:        pos_label, other_label_str = 'B', 'C'
./tests/test_classification.py:254:        pos_label, other_label_str = 2, 1
./tests/test_classification.py:256:        pos_label, other_label_str = 'FRAG', 'NONE'
./tests/test_classification.py:263:        index_label_dict = {0: other_label_str, 1: pos_label}
./tests/test_classification.py:265:        sorted_label_list = sorted([pos_label, other_label_str])

@desilinguist desilinguist merged commit bfe89bc into main Dec 9, 2021
@delete-merged-branch delete-merged-branch bot deleted the 569-rename-pos-label-str branch December 9, 2021 16:41
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.

Rename pos_label_str to pos_label and move to Input section

3 participants