Skip to content

Conversation

@tamarl08
Copy link
Contributor

@tamarl08 tamarl08 commented Sep 8, 2023

  1. Suppress warning "is_categorical_dtype is deprecated..." coming from seaborn following the recent version of pandas. We should remove this when the next version of seaborn is released.
  2. use importlib_metadata to list packages instead of the deprecated pkg_resources.

closes #652, closes #653

@desilinguist
Copy link
Collaborator

desilinguist commented Sep 8, 2023

I am also seeing this warning on the console when running rsmtool:

Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '-' has dtype incompatible with int64, please explicitly cast to a compatible dtype first.

@desilinguist
Copy link
Collaborator

@tamarl08 we need another issue right?

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
rsmtool/preprocessor.py ø
rsmtool/analyzer.py 100.00%
rsmtool/utils/notebook.py 100.00%

📢 Thoughts on this report? Let us know!.

@desilinguist
Copy link
Collaborator

May be worth running all of the tools to check any other warnings in the reports and on the console, while we are at it?

@tamarl08
Copy link
Contributor Author

tamarl08 commented Sep 8, 2023

@desilinguist

  • I ran test with STRICT locally on this branch and it passes, does it check the console tools?
  • I'll open an issue for followup on seaboarn
  • I see these warning too. I was not 100% sure if they are new. should we resolve them before release too?

Copy link
Collaborator

  1. No, that just checks warnings in reports.
  2. Great!
  3. Definitely new.

@tamarl08
Copy link
Contributor Author

tamarl08 commented Sep 8, 2023

@desilinguist I fixed the warning by setting these cells to None - this is better than -1 because then the cell in the table is empty which is nicer.
rsmexplain also has a new warning which is fixed in shap and will be included in their next version. I opened an issue for that too.

@desilinguist
Copy link
Collaborator

desilinguist commented Sep 8, 2023

Perfect! I think the n_init warning has been there for a while. Good to know that they are fixing it.

Hmm, if I test with the lr-exclude-flags-and-zeros test, the table cell has a NaN in it, it's not empty. Also shouldn't the numbers all be integers instead of some being floats?

CleanShot 2023-09-08 at 17 33 49@2x

@desilinguist
Copy link
Collaborator

@tamarl08 speaking of warnings, I am seeing a couple of new ones when I run the lr-exclude-flags-and-zeros:

DataFrame.applymap has been deprecated. Use DataFrame.map instead.
DataFrame.applymap has been deprecated. Use DataFrame.map instead.

@tamarl08
Copy link
Contributor Author

tamarl08 commented Sep 8, 2023

Perfect! I think the n_init warning has been there for a while. Good to know that they are fixing it.

Hmm, if I test with the lr-exclude-flags-and-zeros test, the table cell has a NaN in it, it's not empty. Also shouldn't the numbers all be integers instead of some being floats?
CleanShot 2023-09-08 at 17 33 49@2x

Which report is this? I don't see this table.

Just found another warning in summarize report:

Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`

@desilinguist
Copy link
Collaborator

Perfect! I think the n_init warning has been there for a while. Good to know that they are fixing it.

Hmm, if I test with the lr-exclude-flags-and-zeros test, the table cell has a NaN in it, it's not empty. Also shouldn't the numbers all be integers instead of some being floats?

CleanShot 2023-09-08 at 17 33 49@2x

Which report is this? I don't see this table.

It's rsmtool using the test I mentioned. Run that manually.

Copy link
Collaborator

@desilinguist desilinguist left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the fixes to update_files.py! Sorely needed :)

@tamarl08 tamarl08 force-pushed the 652-categorical-type-fix branch from c572458 to 4256f1c Compare September 13, 2023 16:50
@tamarl08 tamarl08 merged commit 55faa68 into main Sep 13, 2023
@delete-merged-branch delete-merged-branch bot deleted the 652-categorical-type-fix branch September 13, 2023 18:11
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.

Fix warning in report: pkg_resources is deprecated as an API Fix warning in report: is_categorical_dtype is deprecated

3 participants