Spaces:
Running
Running
jiang
commited on
Commit
•
38b7023
1
Parent(s):
369592b
update
Browse files- .idea/.gitignore +8 -0
- .idea/PolyFormer.iml +12 -0
- .idea/inspectionProfiles/Project_Default.xml +97 -0
- .idea/inspectionProfiles/profiles_settings.xml +6 -0
- .idea/modules.xml +8 -0
- .idea/vcs.xml +6 -0
- models/polyformer/unify_transformer.py +2 -1
- requirements.txt +2 -1
.idea/.gitignore
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Default ignored files
|
2 |
+
/shelf/
|
3 |
+
/workspace.xml
|
4 |
+
# Editor-based HTTP Client requests
|
5 |
+
/httpRequests/
|
6 |
+
# Datasource local storage ignored files
|
7 |
+
/dataSources/
|
8 |
+
/dataSources.local.xml
|
.idea/PolyFormer.iml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<module type="PYTHON_MODULE" version="4">
|
3 |
+
<component name="NewModuleRootManager">
|
4 |
+
<content url="file://$MODULE_DIR$" />
|
5 |
+
<orderEntry type="inheritedJdk" />
|
6 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
7 |
+
</component>
|
8 |
+
<component name="PyDocumentationSettings">
|
9 |
+
<option name="format" value="PLAIN" />
|
10 |
+
<option name="myDocStringFormat" value="Plain" />
|
11 |
+
</component>
|
12 |
+
</module>
|
.idea/inspectionProfiles/Project_Default.xml
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<component name="InspectionProjectProfileManager">
|
2 |
+
<profile version="1.0">
|
3 |
+
<option name="myName" value="Project Default" />
|
4 |
+
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
5 |
+
<option name="ignoredErrors">
|
6 |
+
<list>
|
7 |
+
<option value="W29" />
|
8 |
+
<option value="E501" />
|
9 |
+
<option value="W29" />
|
10 |
+
<option value="E501" />
|
11 |
+
<option value="W29" />
|
12 |
+
<option value="E501" />
|
13 |
+
<option value="W29" />
|
14 |
+
<option value="E501" />
|
15 |
+
<option value="W29" />
|
16 |
+
<option value="E501" />
|
17 |
+
<option value="W29" />
|
18 |
+
<option value="E501" />
|
19 |
+
<option value="W29" />
|
20 |
+
<option value="E501" />
|
21 |
+
<option value="W29" />
|
22 |
+
<option value="E501" />
|
23 |
+
<option value="W29" />
|
24 |
+
<option value="E501" />
|
25 |
+
<option value="W29" />
|
26 |
+
<option value="E501" />
|
27 |
+
<option value="W29" />
|
28 |
+
<option value="E501" />
|
29 |
+
<option value="W29" />
|
30 |
+
<option value="E501" />
|
31 |
+
<option value="W29" />
|
32 |
+
<option value="E501" />
|
33 |
+
<option value="W29" />
|
34 |
+
<option value="E501" />
|
35 |
+
<option value="W29" />
|
36 |
+
<option value="E501" />
|
37 |
+
<option value="W29" />
|
38 |
+
<option value="E501" />
|
39 |
+
<option value="W29" />
|
40 |
+
<option value="E501" />
|
41 |
+
<option value="W29" />
|
42 |
+
<option value="E501" />
|
43 |
+
<option value="W29" />
|
44 |
+
<option value="E501" />
|
45 |
+
<option value="W29" />
|
46 |
+
<option value="E501" />
|
47 |
+
<option value="W29" />
|
48 |
+
<option value="E501" />
|
49 |
+
<option value="W29" />
|
50 |
+
<option value="E501" />
|
51 |
+
<option value="W29" />
|
52 |
+
<option value="E501" />
|
53 |
+
<option value="W29" />
|
54 |
+
<option value="E501" />
|
55 |
+
<option value="W29" />
|
56 |
+
<option value="E501" />
|
57 |
+
<option value="W29" />
|
58 |
+
<option value="E501" />
|
59 |
+
<option value="W29" />
|
60 |
+
<option value="E501" />
|
61 |
+
<option value="W29" />
|
62 |
+
<option value="E501" />
|
63 |
+
<option value="W29" />
|
64 |
+
<option value="E501" />
|
65 |
+
<option value="W29" />
|
66 |
+
<option value="E501" />
|
67 |
+
<option value="W29" />
|
68 |
+
<option value="E501" />
|
69 |
+
<option value="W29" />
|
70 |
+
<option value="E501" />
|
71 |
+
<option value="W29" />
|
72 |
+
<option value="E501" />
|
73 |
+
<option value="W29" />
|
74 |
+
<option value="E501" />
|
75 |
+
<option value="W29" />
|
76 |
+
<option value="E501" />
|
77 |
+
<option value="W29" />
|
78 |
+
<option value="E501" />
|
79 |
+
<option value="W29" />
|
80 |
+
<option value="E501" />
|
81 |
+
<option value="W29" />
|
82 |
+
<option value="E501" />
|
83 |
+
<option value="W29" />
|
84 |
+
<option value="E501" />
|
85 |
+
<option value="W29" />
|
86 |
+
<option value="E501" />
|
87 |
+
<option value="W29" />
|
88 |
+
<option value="E501" />
|
89 |
+
<option value="W29" />
|
90 |
+
<option value="E501" />
|
91 |
+
<option value="W29" />
|
92 |
+
<option value="E501" />
|
93 |
+
</list>
|
94 |
+
</option>
|
95 |
+
</inspection_tool>
|
96 |
+
</profile>
|
97 |
+
</component>
|
.idea/inspectionProfiles/profiles_settings.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<component name="InspectionProjectProfileManager">
|
2 |
+
<settings>
|
3 |
+
<option name="USE_PROJECT_PROFILE" value="false" />
|
4 |
+
<version value="1.0" />
|
5 |
+
</settings>
|
6 |
+
</component>
|
.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="ProjectModuleManager">
|
4 |
+
<modules>
|
5 |
+
<module fileurl="file://$PROJECT_DIR$/.idea/PolyFormer.iml" filepath="$PROJECT_DIR$/.idea/PolyFormer.iml" />
|
6 |
+
</modules>
|
7 |
+
</component>
|
8 |
+
</project>
|
.idea/vcs.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="VcsDirectoryMappings">
|
4 |
+
<mapping directory="" vcs="Git" />
|
5 |
+
</component>
|
6 |
+
</project>
|
models/polyformer/unify_transformer.py
CHANGED
@@ -13,6 +13,8 @@ import os.path
|
|
13 |
import random
|
14 |
from typing import Any, Dict, List, Optional, Tuple
|
15 |
|
|
|
|
|
16 |
import torch
|
17 |
import torch.nn as nn
|
18 |
import torch.nn.functional as F
|
@@ -40,7 +42,6 @@ from torch import Tensor
|
|
40 |
|
41 |
from .unify_transformer_layer import TransformerEncoderLayer, TransformerDecoderLayer
|
42 |
from .swin import SwinTransformer
|
43 |
-
from bert.modeling_bert import BertModel
|
44 |
|
45 |
|
46 |
|
|
|
13 |
import random
|
14 |
from typing import Any, Dict, List, Optional, Tuple
|
15 |
|
16 |
+
|
17 |
+
from transformers import BertModel
|
18 |
import torch
|
19 |
import torch.nn as nn
|
20 |
import torch.nn.functional as F
|
|
|
42 |
|
43 |
from .unify_transformer_layer import TransformerEncoderLayer, TransformerDecoderLayer
|
44 |
from .swin import SwinTransformer
|
|
|
45 |
|
46 |
|
47 |
|
requirements.txt
CHANGED
@@ -11,4 +11,5 @@ datasets
|
|
11 |
rouge_score
|
12 |
tokenizers
|
13 |
scikit-image
|
14 |
-
tensorboard
|
|
|
|
11 |
rouge_score
|
12 |
tokenizers
|
13 |
scikit-image
|
14 |
+
tensorboard
|
15 |
+
transformers
|