sbmaruf commited on
Commit
a0c555e
1 Parent(s): 8b9a67a

update code translation

Browse files
Files changed (1) hide show
  1. xCodeEval.py +16 -0
xCodeEval.py CHANGED
@@ -134,6 +134,21 @@ _DESCRIPTIONS = {
134
  4. `src_uid`: A specific identifier that shows which problem the code is associated with. This identifier is **important** for the training of the model. The problem referred to by the `src_uid` provides a natural description of the problem that the code successfully solved. Refer to [Structure of `problem_descriptions.jsonl`](./README.md#structure-of-problem_descriptionsjsonl)
135
  5. `difficulty`: Difficulty rating of the problem indicated by `src_uid`. The higher the harder.
136
  6. `exec_outcome`: Execution outcome status. Follow [Section 4.1](https://arxiv.org/pdf/2303.03004.pdf) to know the potential list of outcomes. The `exec_outcome` flags in the training data comes from a pre-run environmeent. However, training data doesn't includes unit-test to avoid potential hacks. We provide unit test for only dev and test data.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  Objective: Given a source code in lang, generate a code in target lang."""
138
  ),
139
  "program_synthesis": textwrap.dedent(
@@ -248,6 +263,7 @@ _TEXT_FEATURES = {
248
  "code_translation": {
249
  "file_name",
250
  "lang",
 
251
  "source_code",
252
  "code_uid",
253
  "src_uid",
 
134
  4. `src_uid`: A specific identifier that shows which problem the code is associated with. This identifier is **important** for the training of the model. The problem referred to by the `src_uid` provides a natural description of the problem that the code successfully solved. Refer to [Structure of `problem_descriptions.jsonl`](./README.md#structure-of-problem_descriptionsjsonl)
135
  5. `difficulty`: Difficulty rating of the problem indicated by `src_uid`. The higher the harder.
136
  6. `exec_outcome`: Execution outcome status. Follow [Section 4.1](https://arxiv.org/pdf/2303.03004.pdf) to know the potential list of outcomes. The `exec_outcome` flags in the training data comes from a pre-run environmeent. However, training data doesn't includes unit-test to avoid potential hacks. We provide unit test for only dev and test data.
137
+ 7. `lang_cluster`: A generic programming language name the value of `lang` belongs to.
138
+ 8. `prob_desc_description`: Problem description in textual format, math operations are written in latex.
139
+ 9. `prob_desc_input_from`: How the program should take the unit test.
140
+ 10. `prob_desc_output_to`: Where the program should output the result of the unit test.
141
+ 11. `prob_desc_time_limit`: Time limit to solve the problem.
142
+ 12. `prob_desc_memory_limit`: Memory limit to solve the problem.
143
+ 13. `prob_desc_input_spec`: How and in what order the input will be given to the program? It also includes the date range, types, and sizes.
144
+ 14. `prob_desc_output_spec`: How the outputs should be printed. Most of the time the unit test results are matched with an *exact string match* or *floating point comparison* with a precision boundary.
145
+ 15. `prob_desc_sample_inputs`: A sample input for the code that is expected to solve the problem described in `description`.
146
+ 16. `prob_desc_sample_outputs`: The expected output for the `sample_input` that is expected to solve the problem described in `description`.
147
+ 17. `prob_desc_notes`: Explanation of `sample_inputs` & `sample_outputs`.
148
+ 18. `prob_desc_created_at`: The Unix timestamp when the problem was released. Use `datetime` lib in Python to parse it to a human-readable format.
149
+ 19. `file_name`: Name of the source jsonl file from where data is loaded.
150
+ 20. `hidden_unit_tests`: a list of unit tests returned as string. use `json.loads(hidden_unit_tests)` to load the data.
151
+
152
  Objective: Given a source code in lang, generate a code in target lang."""
153
  ),
154
  "program_synthesis": textwrap.dedent(
 
263
  "code_translation": {
264
  "file_name",
265
  "lang",
266
+ "lang_cluster",
267
  "source_code",
268
  "code_uid",
269
  "src_uid",