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

Error in Code Completion Scenario #7

Open
hmdgit opened this issue Mar 21, 2020 · 0 comments
Open

Error in Code Completion Scenario #7

hmdgit opened this issue Mar 21, 2020 · 0 comments

Comments

@hmdgit
Copy link

hmdgit commented Mar 21, 2020

Dear Rafael,

I have successfully been able to run your code in creating language model. However, in order to execute code "completion" scenario, I am getting following error:

image001

Note: My tokenized files do not have end line character ‘\n’ value, so for this purpose, I have changed the lines https://github.com/mast-group/OpenVocabCodeNLM/blob/master/code_nlm.py#L981 into the following:

#end_file_id = test_dataset.vocab["-eod-"]
start_index = 0
file_start_index = 0
while data_covered+10 < data_len:
  # Stop when 1000000 test tokens have been scored.
  if tokens_done > 1000000:
    break

  # Create minibatches for the next file
  # while raw_data[data_covered] != end_file_id:
  #   data_covered += 1
  #data_covered += 1 # eod symbol
  data_covered=data_covered+10

I am attaching sample files sample BPE files.zip. Configuration settings are as follows:

# Scenario options. Training is default so, no option for it.

flags.DEFINE_boolean("predict", False, "Set to True for computing predictability.")

flags.DEFINE_boolean("test", False, "Set to True for computing test perplexity.")

flags.DEFINE_boolean("dynamic_test", False, "Set to True for performing dynamic train-testing perplexity calculation (only one train epoch).")

flags.DEFINE_boolean("maintenance_test", False, "Set to True for performing maintenance train-testing perplexity simulation (only one train epoch).")

flags.DEFINE_boolean("completion", True, "Set to True to run code completion experiment.")

flags.DEFINE_boolean("maintenance_completion", False, "Set to True to run maintenance code completion experiment")

flags.DEFINE_boolean("dynamic", False, "Set to True to run dynamic code completion experiment.")

Please let me know about your concerns.

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