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

Fewshot learning predict proba #3267

Merged
merged 16 commits into from Jun 13, 2023

Conversation

yongxinw
Copy link
Contributor

@yongxinw yongxinw commented Jun 2, 2023

Issue #, if available:

Description of changes:
Adding predict proba for fewshot svm learner

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

@yongxinw yongxinw requested a review from zhiqiangdon June 2, 2023 23:28
@yongxinw yongxinw added the model list checked You have updated the model list after modifying multimodal unit tests/docs label Jun 2, 2023
@github-actions
Copy link

github-actions bot commented Jun 3, 2023

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

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

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

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.

Need to resolve the conflict with the master branch.

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

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

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.

We may need to align with test_predictor (https://github.com/autogluon/autogluon/blob/master/multimodal/tests/unittests/predictor/test_predictor.py#L252-L283) to facilitate future learner refactor. After the refactor, few shot predictor will reuse the MultiModalPredictor APIs, so the tests should also be compatible.

from autogluon.multimodal.utils.few_shot_learning import FewShotSVMPredictor
from autogluon.multimodal.utils.misc import shopee_dataset


def verify_evaluate(test_data, predictor):
results = predictor.evaluate(test_data)

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse verify_predictor_save_load (https://github.com/autogluon/autogluon/blob/master/multimodal/tests/unittests/predictor/test_predictor.py#L46)? We may need to merge the tests after the learner refactor.

assert (preds == preds2).all()
return preds


def test_fewshot_fit_predict():
Copy link
Contributor

Choose a reason for hiding this comment

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


results = predictor.evaluate(test_data)
verify_predict_as_pandas_multiclass(test_data, predictor)
Copy link
Contributor

Choose a reason for hiding this comment

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

@tonyhoo tonyhoo modified the milestone: 0.8 Release Jun 12, 2023
@Innixma Innixma added this to the 0.8 Release milestone Jun 12, 2023
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.

LGTM. Thanks for aligning the tests!

@github-actions
Copy link

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

@github-actions
Copy link

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

@yongxinw yongxinw merged commit ab7ca1c into autogluon:master Jun 13, 2023
29 checks passed
ddelange added a commit to ddelange/autogluon that referenced this pull request Jun 16, 2023
* 'master' of https://github.com/awslabs/autogluon: (24 commits)
  [WIP] 0.8.0 release notes (autogluon#3303)
  Add model keys doc (autogluon#3321)
  Fix NaN warning in np.array(X) (autogluon#3315)
  [Draft] Upgrade networkx to 3.x (autogluon#3317)
  Add calibrate_decision_threshold tutorial (autogluon#3316)
  [Doc] AutoMM FAQ Updates (autogluon#3314)
  Update to v0.8.0 (autogluon#3313)
  Add Experimental Zeroshot HPO (autogluon#3312)
  Update GPU installation guide to use CUDA 11.7 (autogluon#3306)
  [Tutorial]Update tutorials for object detection (autogluon#3305)
  [timeseries] Update documentation (autogluon#3297)
  Update mac cpu install instructions (autogluon#3280)
  Add docstring for hyperparameter_tune_kwargs (autogluon#3307)
  [Doc] Add Search Space Page (autogluon#3311)
  Fewshot learning predict proba (autogluon#3267)
  Fix log to file Windows tests (autogluon#3302)
  Add missing doc pages (autogluon#3304)
  Add calibrate_decision_threshold (autogluon#3298)
  continuous training tutorial update (autogluon#3300)
  Add TabPFN (autogluon#3270)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model list checked You have updated the model list after modifying multimodal unit tests/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants