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

Improve save_path in AutoMM #2635

Merged
merged 5 commits into from
Jan 5, 2023
Merged

Conversation

zhiqiangdon
Copy link
Contributor

@zhiqiangdon zhiqiangdon commented Jan 4, 2023

Issue #, if available:

  1. For object detection, if model_loaded=True, every time calling .predict() would create a new save folder and change _save_path.
  2. Creating saving folder in init() complicates the logic of save_path.
  3. Predictor and matcher use different save_path logic.

Description of changes:

  1. Remove the creation of saving folder from init(). Create saving folder only when it's used.
  2. Remove the _model_loaded flag. For saving the prediction results of object detection, we can directly save to the path _save_path, whether the model is loaded or fitted.
  3. Let matcher use the same save_path logic as predictor.

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

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

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

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

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

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

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

Copy link
Contributor

@FANGAreNotGnu FANGAreNotGnu 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 the fix!

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

save_path = process_save_path(path=old_save_path, raise_if_exist=False)
else:
save_path = os.path.abspath(os.path.expanduser(old_save_path))
save_path = process_save_path(path=old_save_path, raise_if_exist=(raise_if_exist and rank == 0))
Copy link
Collaborator

Choose a reason for hiding this comment

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

We may need a multi-GPU machine in the CI to test for multi-GPU training next time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. Maybe select partial tests to avoid slow down CI.

Copy link
Contributor

@bryanyzhu bryanyzhu left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the fix.

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

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

@zhiqiangdon zhiqiangdon merged commit 9f33fcb into autogluon:master Jan 5, 2023
@zhiqiangdon zhiqiangdon deleted the mm-save branch January 5, 2023 22:35
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

4 participants