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

updated main.deepforest.predict_file for DF usage #852

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

naxatra2
Copy link
Contributor

Fixes #797

In the main.deepforest.predict_file should now also be able to take in a dataframe, not just a csv file.
There was another PR open (PR #838) for similar issue but it wasn't working so I improved it.

@naxatra2
Copy link
Contributor Author

Its clearing all the tests in local environment. I don't know why its not showing in github

@ethanwhite
Copy link
Member

Its clearing all the tests in local environment. I don't know why its not showing in github

That is weird. Can you try either opening a new PR from the same branch or pushing a tiny change to a comment to see if it will trigger the build (or ask us to trigger it).

@ethanwhite
Copy link
Member

That did it. I think there was just hiccup with the prompt asking us to allow the tests to run (since you're a new contributor). The build failure is something that just cropped up with an image change. Hopefully #855 will fix that and then we can rerun

@naxatra2
Copy link
Contributor Author

Okay. I was very confused as to what went wrong. This certainly helps.

@ethanwhite
Copy link
Member

@naxatra2 - If you rebase this on main the tests should run now

@naxatra2
Copy link
Contributor Author

Is this good ?

@ethanwhite
Copy link
Member

Thanks @naxatra2 - tests are passing now. We'll try to review the PR next week.

accidentally committed to the wrong branch so removed it
@ethanwhite
Copy link
Member

@naxatra2 - looks like a style issue crept in with your updated commits. See https://deepforest.readthedocs.io/en/v1.4.1/development/contributing.html#using-yapf to fix it and then we'll get this reviewed for you now that the holidays are over

Copy link
Contributor

@henrykironde henrykironde left a comment

Choose a reason for hiding this comment

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

The function looks good. I have left a comment on the test section

@@ -649,8 +649,7 @@ def test_predict_tile_with_crop_model(m, config):
"xmin", "ymin", "xmax", "ymax", "label", "score", "cropmodel_label", "geometry",
"cropmodel_score", "image_path"
}



Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to come up with some test for the added feature functionality?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay. I will write a new test case and commit it

@henrykironde henrykironde added the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting author contribution Waiting on the issue author to do something before proceeding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

main.deepforest.predict_file should be able to take in a dataframe, not just a csv file.
3 participants