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 flag to disable training on GPU for TEDPolicy #10897

Closed
1 task
indam23 opened this issue Feb 15, 2022 · 7 comments
Closed
1 task

Add flag to disable training on GPU for TEDPolicy #10897

indam23 opened this issue Feb 15, 2022 · 7 comments
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@indam23
Copy link
Contributor

indam23 commented Feb 15, 2022

What problem are you trying to solve?

Since the bump to Tensorflow 2.6, training on TED on GPU is significantly (in one case 4X) slower than before. CPU training time is not affected to the same degree.

Because it is still advantageous to use GPU for DIETClassifier, it's desirable to disable training on GPU for TED only to save time.

What's your suggested solution?

A parameter for TED like use_gpu that controls whether available GPUs are used or not.

Examples (if relevant)

No response

Is anything blocking this from being implemented? (if relevant)

No response

Definition of Done

  • flag added
@indam23 indam23 added type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Feb 15, 2022
@WashingtonBispo
Copy link
Contributor

WashingtonBispo commented Feb 17, 2022

Exalate commented:

WashingtonBispo commented:

Hello There. I have interest on work on this issue.

@indam23
Copy link
Contributor Author

indam23 commented Feb 17, 2022

Exalate commented:

melindaloubser1 commented:

@WashingtonBispo Would you like to contribute a PR for this feature or do you mean you're interested in future work on it?

@WashingtonBispo
Copy link
Contributor

WashingtonBispo commented Feb 17, 2022

Exalate commented:

WashingtonBispo commented:

I intent to contribute a PR. I will work on it this weekend.

@indam23
Copy link
Contributor Author

indam23 commented Feb 21, 2022

Exalate commented:

melindaloubser1 commented:

Great, thanks! Please tag me in the PR and I'll make sure it gets reviewed

@WashingtonBispo
Copy link
Contributor

WashingtonBispo commented Feb 24, 2022

Exalate commented:

WashingtonBispo commented:

Done. @melindaloubser1

@indam23
Copy link
Contributor Author

indam23 commented Mar 2, 2022

Exalate commented:

melindaloubser1 commented:

For anyone who needs a workaround until the PR is merged, you can train NLU on GPU and core on CPU separately, by exporting CUDA_VISIBLE_DEVICES=-1 before training core. Then you can combine the models:

  1. Default GPU NLU training
    rasa train nlu --fixed-model-name nlu

  2. GPU excluded core training

  3. If this is inside a docker container possible that you'll additionally need NVIDIA_VISIBLE_DEVICES=none
    export CUDA_VISIBLE_DEVICES="-1"
    rasa train core --fixed-model-name core

  4. Combine NLU & Core models
    cd models
    mkdir nlu-model
    tar xvf nlu.tar.gz -C nlu-model
    mkdir core-model
    tar xvf core.tar.gz -C core-model
    mkdir combined
    mv core-model/core combined
    mv nlu-model/nlu combined
    mv core-model/fingerprint.json combined
    tar -C combined -cvzf combined.tar.gz .

@rasabot-exalate rasabot-exalate added area:rasa-oss and removed type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Mar 15, 2022 — with Exalate Issue Sync
@m-vdb m-vdb added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-oss and removed area:rasa-oss area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Mar 16, 2022
@rasabot-exalate rasabot-exalate added area:rasa-oss type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR and removed type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss labels Mar 17, 2022 — with Exalate Issue Sync
@rasabot-exalate rasabot-exalate added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:enhancement_:sparkles: type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR and removed area:rasa-oss :ferris wheel: labels Mar 17, 2022 — with Exalate Issue Sync
@dakshvar22
Copy link
Contributor

Closed by #10944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR
Projects
None yet
Development

No branches or pull requests

5 participants