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

Add Hyperopt example for BERT classifier #186

Merged
merged 7 commits into from
Sep 6, 2019

Conversation

AvinashBukkittu
Copy link
Collaborator

This PR

  • Adds an example to showcase hyperparameter tuning with Executor

  • Fixes a memory leakage issue in Executor due to atexit (Now, opening and closing of files are done explicitly in train and test methods)

Copy link
Member

@ZhitingHu ZhitingHu left a comment

Choose a reason for hiding this comment

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

So now the OOM issue is fixed?

examples/bert/README.md Outdated Show resolved Hide resolved
examples/bert/README.md Outdated Show resolved Hide resolved
examples/bert/README.md Outdated Show resolved Hide resolved
examples/bert/README.md Outdated Show resolved Hide resolved
examples/bert/bert_tpe_config_classifier.py Outdated Show resolved Hide resolved
examples/bert/bert_with_tpe.py Outdated Show resolved Hide resolved
examples/bert/bert_with_tpe.py Outdated Show resolved Hide resolved
examples/bert/bert_with_tpe.py Outdated Show resolved Hide resolved
examples/bert/config_data.py Outdated Show resolved Hide resolved
examples/bert/requirements.txt Outdated Show resolved Hide resolved
texar/torch/run/executor.py Show resolved Hide resolved
texar/torch/run/executor.py Show resolved Hide resolved
texar/torch/run/executor.py Show resolved Hide resolved
@AvinashBukkittu
Copy link
Collaborator Author

So now the OOM issue is fixed?

Yes, the issue was caused because _close_files method (due to library atexit) was holding a reference to Executor instance due to which Adam was not cleared from memory. We removed atexit dependency.

@ZhitingHu
Copy link
Member

Looks good on my side.

Do we still have a plan of adding relevant Executor hyper tuning modules?

@AvinashBukkittu
Copy link
Collaborator Author

Looks good on my side.

Do we still have a plan of adding relevant Executor hyper tuning modules?

I discussed with @huzecong on keras-tuner like interfaces for Executor. They do not provide any additional functionalities but may provide some good utilities for the user. I think this is good and we can add these features in the future if we get requests from the users.

examples/bert/bert_hypertuning_config_classifier.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Show resolved Hide resolved
@ZhitingHu
Copy link
Member

Looks good on my side.
Do we still have a plan of adding relevant Executor hyper tuning modules?

I discussed with @huzecong on keras-tuner like interfaces for Executor. They do not provide any additional functionalities but may provide some good utilities for the user. I think this is good and we can add these features in the future if we get requests from the users.

Let's make an issue to keep track of this

@AvinashBukkittu
Copy link
Collaborator Author

Looks good on my side.
Do we still have a plan of adding relevant Executor hyper tuning modules?

I discussed with @huzecong on keras-tuner like interfaces for Executor. They do not provide any additional functionalities but may provide some good utilities for the user. I think this is good and we can add these features in the future if we get requests from the users.

Let's make an issue to keep track of this

#191

texar/torch/data/data/dataset_utils.py Outdated Show resolved Hide resolved
examples/bert/bert_with_hypertuning_main.py Outdated Show resolved Hide resolved
docs/code/data.rst Outdated Show resolved Hide resolved
@AvinashBukkittu AvinashBukkittu merged commit 84db3fd into asyml:executor Sep 6, 2019
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.

3 participants