nazneen commited on
Commit
8a7fbed
1 Parent(s): af6a1d7

added offline files

Browse files
app.py CHANGED
@@ -247,7 +247,9 @@ if __name__ == "__main__":
247
  with rcol:
248
  with st.spinner(text='loading...'):
249
  st.markdown('<h3>Word Distribution in Error Slice</h3>', unsafe_allow_html=True)
250
- commontokens = frequent_tokens(data_df, tokenizer, loss_quantile=loss_quantile)
 
 
251
  with st.expander("How to read the table:"):
252
  st.markdown("* The table displays the most frequent tokens in error slices, relative to their frequencies in the val set.")
253
  st.write(commontokens)
@@ -260,10 +262,12 @@ if __name__ == "__main__":
260
  merged = kmeans(data_df,num_clusters=num_clusters)
261
  with lcol:
262
  st.markdown('<h3>Error Slices</h3>',unsafe_allow_html=True)
263
- dataframe = merged[['content', 'label', 'pred', 'loss', 'cluster']].sort_values(
264
- by=['loss'], ascending=False)
265
- table_html = dataframe.to_html(
266
- columns=['content', 'label', 'pred', 'loss', 'cluster'], max_rows=50)
 
 
267
  # table_html = table_html.replace("<th>", '<th align="left">') # left-align the headers
268
  with st.expander("How to read the table:"):
269
  st.markdown("* *Error slice* refers to the subset of evaluation dataset the model performs poorly on.")
 
247
  with rcol:
248
  with st.spinner(text='loading...'):
249
  st.markdown('<h3>Word Distribution in Error Slice</h3>', unsafe_allow_html=True)
250
+ #uncomment the next two lines to run dynamically and not from file
251
+ #commontokens = frequent_tokens(data_df, tokenizer, loss_quantile=loss_quantile)
252
+ commontokens = pd.read_parquet('./assets/data/'+dataset+ '_'+ model+'_commontokens.parquet')
253
  with st.expander("How to read the table:"):
254
  st.markdown("* The table displays the most frequent tokens in error slices, relative to their frequencies in the val set.")
255
  st.write(commontokens)
 
262
  merged = kmeans(data_df,num_clusters=num_clusters)
263
  with lcol:
264
  st.markdown('<h3>Error Slices</h3>',unsafe_allow_html=True)
265
+ dataframe=pd.read_parquet('./assets/data/'+dataset+ '_'+ model+'_error-slices.parquet')
266
+ #uncomment the next next line to run dynamically and not from file
267
+ # dataframe = merged[['content', 'label', 'pred', 'loss', 'cluster']].sort_values(
268
+ # by=['loss'], ascending=False)
269
+ # table_html = dataframe.to_html(
270
+ # columns=['content', 'label', 'pred', 'loss', 'cluster'], max_rows=50)
271
  # table_html = table_html.replace("<th>", '<th align="left">') # left-align the headers
272
  with st.expander("How to read the table:"):
273
  st.markdown("* *Error slice* refers to the subset of evaluation dataset the model performs poorly on.")
assets/data/amazon_polarity_albert-base-v2-yelp-polarity_commontokens.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de69efcda9ab5c3aa8dc616c016cace08096cbc21478dd894f9cccf0b843ede4
3
+ size 6067
assets/data/amazon_polarity_albert-base-v2-yelp-polarity_error-slices.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62ce63230551fe9870919f051dfeead6892bb917ba63c7edfcc0e819867ed2cd
3
+ size 5954640
assets/data/amazon_polarity_distilbert-base-uncased-finetuned-sst-2-english_commontokens.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de69efcda9ab5c3aa8dc616c016cace08096cbc21478dd894f9cccf0b843ede4
3
+ size 6067
assets/data/amazon_polarity_distilbert-base-uncased-finetuned-sst-2-english_error-slices.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6626d19361cfe06ba70be19004d18eb23a1764926d15ed5b103ec36fc2d8eaea
3
+ size 5954642
assets/data/yelp_polarity_albert-base-v2-yelp-polarity_commontokens.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e5241d13a23656bbab7851d4a8ad1df70d8675e9db62f3e9ade719b41c524db
3
+ size 6681
assets/data/yelp_polarity_albert-base-v2-yelp-polarity_error-slices.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7140867800b4e9ac5f34b5c181ec69c261638582ef55c142aaf23320e9e56743
3
+ size 9765767
assets/data/yelp_polarity_distilbert-base-uncased-finetuned-sst-2-english_commontokens.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c243229a8f55a1910fcab1823cd4810d51a59c6442244a47ee5ee621da069518
3
+ size 6509
assets/data/yelp_polarity_distilbert-base-uncased-finetuned-sst-2-english_error-slices.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ec890d0df88c0d7fdaba7ca9e50f715c50d173f99ae021fd4c49534d4ef12a9
3
+ size 9803781
requirements.txt CHANGED
@@ -36,28 +36,13 @@ frozenlist==1.2.0; python_version >= '3.6'
36
  fsspec[http]==2021.11.0; python_version >= '3.6'
37
  future==0.18.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
38
  fuzzywuzzy==0.18.0
39
- gensim==4.1.2
40
  gitdb==4.0.9; python_version >= '3.6'
41
  gitpython==3.1.24; python_version >= '3.7'
42
  google-auth-oauthlib==0.4.6; python_version >= '3.6'
43
  google-auth==2.3.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
44
  grpcio==1.41.1
45
- huggingface-hub==0.1.2; python_version >= '3.6'
46
  idna==3.3; python_version >= '3'
47
  importlib-resources==5.4.0; python_version < '3.9'
48
- ipykernel==6.5.0; python_version >= '3.4'
49
- ipython-genutils==0.2.0
50
- ipython==7.29.0; python_version >= '3.3'
51
- ipywidgets==7.6.5
52
- jedi==0.18.0; python_version >= '3.6'
53
- jinja2==3.0.3; python_version >= '3.6'
54
- joblib==1.1.0; python_version >= '3.6'
55
- jsonlines==2.0.0; python_version >= '3.6'
56
- jsonschema==4.2.1; python_version >= '3.7'
57
- jupyter-client==7.0.6; python_full_version >= '3.6.1'
58
- jupyter-core==4.9.1; python_version >= '3.6'
59
- jupyterlab-pygments==0.1.2
60
- jupyterlab-widgets==1.0.2; python_version >= '3.6'
61
  kaleido==0.2.1
62
  markdown==3.3.4; python_version >= '3.6'
63
  markupsafe==2.0.1; python_version >= '3.6'
 
36
  fsspec[http]==2021.11.0; python_version >= '3.6'
37
  future==0.18.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
38
  fuzzywuzzy==0.18.0
 
39
  gitdb==4.0.9; python_version >= '3.6'
40
  gitpython==3.1.24; python_version >= '3.7'
41
  google-auth-oauthlib==0.4.6; python_version >= '3.6'
42
  google-auth==2.3.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
43
  grpcio==1.41.1
 
44
  idna==3.3; python_version >= '3'
45
  importlib-resources==5.4.0; python_version < '3.9'
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  kaleido==0.2.1
47
  markdown==3.3.4; python_version >= '3.6'
48
  markupsafe==2.0.1; python_version >= '3.6'