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

Problem in reproducing attention analysis from the paper "What Do They Capture? - A Structural Analysis of Pre-Trained Language Models for Source Code" #19

Open
dfighter1312 opened this issue Oct 24, 2022 · 0 comments

Comments

@dfighter1312
Copy link

Hi,

First of all, thank you for such detailed writing for discussion on pre-trained models for source code.

I am currently trying to reproduce the result, but in compute_edge_features.py, line 133, you are referring to a path ../data/code_new/code_contact_map/noneighbor/train.json, which I could not find anywhere.

I did try to change the path to the train.ast file provided in the Python AST dataset, but another error is raised.

Layers: 12
Heads: 12
Loading dataset
100% 5000/5000 [00:00<00:00, 1458178.28it/s]
  0% 0/5000 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "compute_edge_features.py", line 155, in <module>
    min_attn=min_attn)
  File "compute_edge_features.py", line 64, in compute_mean_attention
    feature_map=item['feature_map']
KeyError: 'feature_map'

I hope you can give me an instruction to resolve the problem.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant