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

FusionModel + SVM as FewShotSVMPredictor #2850

Merged
merged 95 commits into from
Feb 8, 2023

Conversation

yongxinw
Copy link
Contributor

@yongxinw yongxinw commented Feb 6, 2023

Issue #, if available:

Description of changes:
Integrating FusionModel + SVM as a utility FewShotSVMPredictor class. The way to use this predictor is the same as in MultiModalPredictor. See below:

predictor = FewShotSVMPredictor(
                    label="label",
                    hyperparameters=hyperparameters,
                    problem_type="feature_extraction",
                    eval_metric="acc"
                )
predictor.fit(train_df)
preds = predictor.predict(data=test_df)
result = predictor.evaluate(test_df, metrics=["acc", "macro_f1"])

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

� Conflicts:
�	multimodal/src/autogluon/multimodal/predictor.py
…s` to using `get_detection_classes`. Refactoring saving results to utils.
� Conflicts:
�	multimodal/src/autogluon/multimodal/predictor.py
…ing visualization to a separate function call outside predict, removing prints, modifying doc strings, adding TODO to use mmdet visualization later,
@yongxinw yongxinw changed the title Fewshot svm predictor FusionModel + SVM as FewShotSVMPredictor Feb 6, 2023
@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Job PR-2850-f53113d is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2850/f53113d/index.html

@yongxinw
Copy link
Contributor Author

yongxinw commented Feb 7, 2023

Just verified for image classification. This implementation also works.

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Job PR-2850-b3b059a is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2850/b3b059a/index.html

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Job PR-2850-10c5885 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2850/10c5885/index.html

.gitignore Outdated Show resolved Hide resolved
Copy link
Contributor

@zhiqiangdon zhiqiangdon left a comment

Choose a reason for hiding this comment

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

  1. Do we want to expose FewShotSVMPredictor to users, i.e., letting from autogluon.multimodal import FewShotSVMPredictor ?

Copy link
Contributor

@zhiqiangdon zhiqiangdon left a comment

Choose a reason for hiding this comment

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

PR #2827 seems to have a similar functionality. What is the consideration of having 2 PRs of doing the same thing?

self._automm_predictor = MultiModalPredictor(
label=label,
hyperparameters=hyperparameters,
problem_type=FEATURE_EXTRACTION,
Copy link
Contributor

Choose a reason for hiding this comment

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

FEATURE_EXTRACTION is for text only now. Do we also need to handle image data?

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Job PR-2850-76b063a is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2850/76b063a/index.html

@yongxinw
Copy link
Contributor Author

yongxinw commented Feb 8, 2023

  1. Do we want to expose FewShotSVMPredictor to users, i.e., letting from autogluon.multimodal import FewShotSVMPredictor ?

I think we'll leave it as a util function for now. We can design our learner after 0.7 and expose that to the users.

@github-actions
Copy link

github-actions bot commented Feb 8, 2023

Job PR-2850-ae55a94 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2850/ae55a94/index.html

Copy link
Collaborator

@sxjscience sxjscience left a comment

Choose a reason for hiding this comment

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

LGTM overall. We can refactor the source code later

@yongxinw yongxinw merged commit c89491d into autogluon:master Feb 8, 2023
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.

None yet