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

Update package to address deprecation warnings #625

Open
5 of 10 tasks
ethanwhite opened this issue Mar 20, 2024 · 5 comments
Open
5 of 10 tasks

Update package to address deprecation warnings #625

ethanwhite opened this issue Mar 20, 2024 · 5 comments
Labels
good first issue Good for newcomers

Comments

@ethanwhite
Copy link
Member

ethanwhite commented Mar 20, 2024

We have a growing number of deprecation warnings accumulating. Below are a number of these warnings that are produced by the current test suite. These aren't all necessarily from DeepForest directly (they may be upstream), but we should start finding the ones that are in DeepForest and update to get ahead of these changes. For folks looking for starter issues a great thing to do is to pick a single warning below, find one of our tests that produces the deprecation warning, and then see if the warning is triggered directly by the code run by that test or if it is upstream. If it is in the DeepForest code then work on a PR to fix just that warning and run the whole test suite to make sure that your fixes catches all instances of it in the code base.

  • The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  • Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=FasterRCNN_ResNet50_FPN_Weights.COCO_V1. You can also use weights=FasterRCNN_ResNet50_FPN_Weights.DEFAULT to get the most up-to-date weights.
  • datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  • Expected None, but tests/test_FasterRCNN.py::test_retinanet returned <deepforest.models.FasterRCNN.Model object at 0x7f91cba5d940>, which will be an error in a future version of pytest. Did you mean to use assert instead of return?
  • The verbose parameter is deprecated. Please use get_last_lr() to access the learning rate.
  • The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
  • Type google._upb._message.MessageMapContainer uses PyType_Spec with a metaclass that has custom tp_new. This is deprecated and will no longer be allowed in Python 3.14.
  • Type google._upb._message.ScalarMapContainer uses PyType_Spec with a metaclass that has custom tp_new. This is deprecated and will no longer be allowed in Python 3.14.
  • The op parameter is deprecated and will be removed in a future release. Please use the predicate parameter instead.
  • "Directly specifying the num_classes arg in deepforest.main will be deprecated in 2.0 in favor of config_args. Use main.deepforest(config_args={'num_classes':value})" main.py line 66

If you are working on one of these please drop a note in this issue with which warning you are working on so that folks don't duplicate effort.

EDIT: Removed the last item since we're generating it intentionally

@ethanwhite ethanwhite added the good first issue Good for newcomers label Mar 20, 2024
@Mu-Magdy
Copy link
Contributor

That is a good issue I will work on the first warning and make a PR

  • The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.

@Mu-Magdy
Copy link
Contributor

As a result of fixing the first deprecation warning I think it solved the second warning as they are related

@Mu-Magdy
Copy link
Contributor

I will work on the last task

  • The op parameter is deprecated and will be removed in a future release. Please use the predicate parameter instead.

ethanwhite added a commit that referenced this issue Mar 20, 2024
fixing the deprecation warning in the first two tasks of the issue #625
@Om-Doiphode
Copy link
Contributor

I have worked on the fifth issue:

The verbose parameter is deprecated. Please use get_last_lr() to access the learning rate.

I have issued a pull request, please review it. Thanks!

@ire-mide1
Copy link

ire-mide1 commented Mar 28, 2024

I have worked on issue 4. please view my pull request

Expected None, but tests/test_FasterRCNN.py::test_retinanet returned <deepforest.models.FasterRCNN.Model object at 0x7f91cba5d940>, which will be an error in a future version of pytest. Did you mean to use assert instead of return?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants