You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 23:33:09 UTC

[GitHub] [beam] damccorm opened a new issue, #21453: Support **kwargs for PyTorch models.

damccorm opened a new issue, #21453:
URL: https://github.com/apache/beam/issues/21453

   Some models in Pytorch instantiating from torch.nn.Module, has extra parameters in the forward function call. These extra parameters can be passed as Dict or as positional arguments. 
   
   Example of PyTorch models supported by Hugging Face -\> [https://huggingface.co/bert-base-uncased](https://huggingface.co/bert-base-uncased)
   
   [Some torch models on Hugging face](https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py)
   
   Eg: [https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertModel](https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertModel)
   ```
   
   inputs = {
        input_ids: Tensor1,
        attention_mask: Tensor2,
        token_type_ids: Tensor3,
   }
   
   model = BertModel.from_pretrained("bert-base-uncased") # which is a  
   # subclass of torch.nn.Module
   
   outputs
   = model(**inputs) # model forward method should be expecting the keys in the inputs as the positional
   arguments.
   ```
   
    
   
   [Transformers](https://pytorch.org/hub/huggingface_pytorch-transformers/) integrated in Pytorch is supported by Hugging Face as well. 
   
    
   
   Imported from Jira [BEAM-14337](https://issues.apache.org/jira/browse/BEAM-14337). Original Jira may contain additional context.
   Reported by: Anand Inguva.
   Subtask of issue #21435


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] yeandy commented on issue #21453: Support **kwargs for PyTorch models.

Posted by GitBox <gi...@apache.org>.
yeandy commented on issue #21453:
URL: https://github.com/apache/beam/issues/21453#issuecomment-1147498655

   Got it, thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] yeandy commented on issue #21453: Support **kwargs for PyTorch models.

Posted by GitBox <gi...@apache.org>.
yeandy commented on issue #21453:
URL: https://github.com/apache/beam/issues/21453#issuecomment-1147418882

   @damccorm  I'm unable to self-assign. Is it because I don't have write permissions? Is there a GH action that can allow me to self-assign future issues?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] tvalentyn commented on issue #21453: Support **kwargs for PyTorch models.

Posted by GitBox <gi...@apache.org>.
tvalentyn commented on issue #21453:
URL: https://github.com/apache/beam/issues/21453#issuecomment-1156595888

   we decided to move forward with a separate param:  https://github.com/apache/beam/pull/21806


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on issue #21453: Support **kwargs for PyTorch models.

Posted by GitBox <gi...@apache.org>.
damccorm commented on issue #21453:
URL: https://github.com/apache/beam/issues/21453#issuecomment-1147436599

   One of the unfortunate downsides of moving to issues is that non-committers can't self-assign/triage issues that they didn't create by default. I think that's a workflow we'll need to support going forward though, I'll look into it. For the moment, I'd recommend commenting/declaring intent to work on any issues.
   
   I have access through https://github.com/apache/beam/blob/4dce7b8857f37608321253073745fe7611a48af9/.asf.yaml#L39 which gives triage permissions, unfortunately that's limited to 20 people though


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on issue #21453: Support **kwargs for PyTorch models.

Posted by GitBox <gi...@apache.org>.
damccorm commented on issue #21453:
URL: https://github.com/apache/beam/issues/21453#issuecomment-1146702807

   Unable to assign user @yeandy. If able, self-assign, otherwise tag @damccorm so that he can assign you. Because of GitHub's spam prevention system, your activity is required to enable assignment in this repo.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on issue #21453: Support **kwargs for PyTorch models.

Posted by GitBox <gi...@apache.org>.
damccorm commented on issue #21453:
URL: https://github.com/apache/beam/issues/21453#issuecomment-1147481239

   Once https://github.com/apache/beam/pull/21719 is in, you should be able to do this with chat-op commands


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] tvalentyn closed issue #21453: Support **kwargs for PyTorch models.

Posted by GitBox <gi...@apache.org>.
tvalentyn closed issue #21453: Support **kwargs for PyTorch models.
URL: https://github.com/apache/beam/issues/21453


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org