You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe I am using version 3.2.1. However, I am not sure how to check the version that I installed. Would you please also tell me how to check this? I can only check the verision of "transformers" which is "'4.24.0".
Details
Traceback (most recent call last): File "T5_adapter.py", line 279, in <module> train(args) File "T5_adapter.py", line 121, in train model.add_adapter_fusion(ac.Fuse(ac.Stack('base','a'),ac.Stack('base','b'),ac.Stack('base','c'))) File "/home/xz479/rds/hpc-work/miniconda3/envs/adapter/lib/python3.8/site-packages/transformers/adapters/model_mixin.py", line 509, in add_adapter_fusion self.config.adapters.add_fusion(adapter_names, config=config) File "/home/xz479/rds/hpc-work/miniconda3/envs/adapter/lib/python3.8/site-packages/transformers/adapters/configuration.py", line 758, in add_fusion fusion_name = ",".join(fusion_name) TypeError: sequence item 0: expected str instance, Stack found
What I intended to do is to pass the data through a "base" adapter, then the output is fed to 3 adapters "a,b,c" identically.
So I did this model.add_adapter_fusion(ac.Fuse(ac.Stack('base','a'),ac.Stack('base','b'),ac.Stack('base','c'))).
In the documentation, it says Fuse can support Stack without further composition. However it gives me this error. Would you please verify if I am using the composition correctly?
Thank you very much.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has been without activity for 90 days. This issue will be closed in 14 days unless you comment or remove the stale label.
Fuse and Stack can indeed be nested as described. For the setup described (first passing though "base" adapter and afterwards fusing adapters "a", "b" and "c", the code would look as follows:
Note that for adding the fusion layer (add_adapter_fusion()), only the to be fused adapters should be specified. The full composition setup is then given when activating adapters via active_adapters.
Environment info
I believe I am using version 3.2.1. However, I am not sure how to check the version that I installed. Would you please also tell me how to check this? I can only check the verision of "transformers" which is "'4.24.0".
Details
Traceback (most recent call last): File "T5_adapter.py", line 279, in <module> train(args) File "T5_adapter.py", line 121, in train model.add_adapter_fusion(ac.Fuse(ac.Stack('base','a'),ac.Stack('base','b'),ac.Stack('base','c'))) File "/home/xz479/rds/hpc-work/miniconda3/envs/adapter/lib/python3.8/site-packages/transformers/adapters/model_mixin.py", line 509, in add_adapter_fusion self.config.adapters.add_fusion(adapter_names, config=config) File "/home/xz479/rds/hpc-work/miniconda3/envs/adapter/lib/python3.8/site-packages/transformers/adapters/configuration.py", line 758, in add_fusion fusion_name = ",".join(fusion_name) TypeError: sequence item 0: expected str instance, Stack found
What I intended to do is to pass the data through a "base" adapter, then the output is fed to 3 adapters "a,b,c" identically.
So I did this
model.add_adapter_fusion(ac.Fuse(ac.Stack('base','a'),ac.Stack('base','b'),ac.Stack('base','c')))
.In the documentation, it says Fuse can support Stack without further composition. However it gives me this error. Would you please verify if I am using the composition correctly?
Thank you very much.
The text was updated successfully, but these errors were encountered: