Skip to content

Stanford cars #5166

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

Merged
merged 21 commits into from
Jan 18, 2022
Merged

Stanford cars #5166

merged 21 commits into from
Jan 18, 2022

Conversation

abhi-glitchhg
Copy link
Contributor

@abhi-glitchhg abhi-glitchhg commented Jan 6, 2022

#5108
I have added Stanford Cars dataset
cc @pmeier

*added stanford_cars
added stanfordCars to docs
@facebook-github-bot
Copy link

facebook-github-bot commented Jan 6, 2022

💊 CI failures summary and remediations

As of commit 121bb55 (more details on the Dr. CI page):



2 failures not recognized by patterns:

Job Step Action
CircleCI binary_linux_conda_py3.7_cu111 packaging/build_conda.sh 🔁 rerun
CircleCI cmake_linux_gpu Setup conda 🔁 rerun

1 job timed out:

  • binary_linux_conda_py3.7_cu111

🚧 1 ongoing upstream failure:

These were probably caused by upstream breakages that are not fixed yet.


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

minor edits
minor edits
Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

Thanks a lot @abhi-glitchhg for the PR. I did an initial round of review and will do another once my comments are addressed.

I'm using only one file (cars_train_annos.mat) out of all files in root/devkit. so do I have to reproduce fake data files for all files in devkit or just one fake cars_train_annos.mat is sufficient?

Unless the other files could interfere with your implementation you don't need to "mock" them. Since you select the specific file by name rather than say list all files and select one by a partial name, I think you can safely ignore them here.

@pmeier
Copy link
Collaborator

pmeier commented Jan 6, 2022

Regarding the code format and the failing CI job: we have a couple of autoformatters that handle this for you. Have a look at our contribution guide.

@abhi-glitchhg abhi-glitchhg marked this pull request as draft January 7, 2022 17:20
@abhi-glitchhg

This comment was marked as resolved.

@pmeier
Copy link
Collaborator

pmeier commented Jan 10, 2022

I feel this is wrong, and i feel that only 4 files (that i have edited/added) should be modified by the pre-commit hook.

Yes, that is wrong. Are you working on Windows by any chance? Anyway, you can disable it with SKIP=mixed-line-ending pre-commit --all-files

Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

Hey @abhi-glitchhg, I did another round.

class_names = meta_data["class_names"][0]
return {class_name[0].replace(" ", "_").replace("/", "_"): i for i, class_name in enumerate(class_names)}

def _make_dataset(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def _make_dataset(self):
def _make_dataset(self) -> List[Tuple[str, int]]:

@abhi-glitchhg

This comment was marked as resolved.

@abhi-glitchhg
Copy link
Contributor Author

im using windows and conda virtual environment

@abhi-glitchhg

This comment was marked as resolved.

@pmeier
Copy link
Collaborator

pmeier commented Jan 12, 2022

@abhi-glitchhg Whatever you did, CI is happy with the code format now. You don't have to do anything else in that regard. Anyway, that is on us to investigate and fix. Thanks a lot for reporting the issue.

Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

Hey @abhi-glitchhg, besides the test failures there are only minor comments left from my side.

In addition, could you remove most of the comments you added in the code? We should only add comments if they add information to the code rather than to just describe what the code does. I'll give you an example below.

@NicolasHug NicolasHug marked this pull request as ready for review January 17, 2022 18:09
@NicolasHug
Copy link
Member

@abhi-glitchhg thank you so much for your work on this PR! I took the liberty to fix some minor failures, and do a few cleanups in 8fceb0b (changes look big but I mostly just moved stuff around, you had done all the hard work already!).

Perhaps @pmeier can take a final look at it and I'll merge when green?

Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

Two nits, but nothing blocking. Thanks a lot @abhi-glitchhg and @NicolasHug!

@NicolasHug NicolasHug merged commit 8ba482a into pytorch:main Jan 18, 2022
@github-actions
Copy link

Hey @NicolasHug!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

facebook-github-bot pushed a commit that referenced this pull request Jan 19, 2022
Summary:
* [WIP]
*added stanford_cars

* [WIP]
added stanfordCars to docs

* [WIP]
minor edits

* [WIP]
minor edits

* edited StanfordCars class

* Adding Testcase for stanford cars

* Added Testcase for stanford cars

* Added Testcase for stanford cars

* minor edit

* made changes as per the suggestions

* fixed typo in naming stanford_cars.py

* cars_meta.mat file will be created in test

* Some cleanups

* Sigh

* don't convert to strings

Reviewed By: datumbox, NicolasHug

Differential Revision: D33655259

fbshipit-source-id: 48882109cb3e21bccdba34eef9ef17e7468b78c4

Co-authored-by: Nicolas Hug <[email protected]>
@abhi-glitchhg abhi-glitchhg deleted the stanford_cars branch February 4, 2022 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants