alquist4121 commited on
Commit
da2aa03
1 Parent(s): a882134

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md CHANGED
@@ -15,6 +15,22 @@ You need to manually combine each dataset if you want to use a multilingual data
15
  ```python
16
  from datasets import load_dataset
17
  xcsn_pt_python_en = load_dataset("ynklab/XCodeSearchNet", data_dir='pretraining/python/en')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  print(xcsn_pt_python_en['train'][0])
19
  """
20
  {
@@ -27,10 +43,23 @@ print(xcsn_pt_python_en['train'][0])
27
  ```python
28
  from datasets import load_dataset
29
  xcsn_ft_python_en = load_dataset("ynklab/XCodeSearchNet", data_dir='finetuning/python/en')
 
 
 
 
 
 
 
 
 
 
 
 
30
  print(xcsn_ft_python_en['train'][0])
31
  """
32
  {
33
  'text': '1<CODESPLIT><CODESPLIT><CODESPLIT>Logs the definition of the object that was just auto - decorated inside the ipython notebook .<CODESPLIT>def _logdef ( self , n , o , otype ) : import re try : #The latest input cell will be the one that this got executed #from. TODO: actually, if acorn got imported after the fact, then #the import would have caused all the undecorated functions to be #decorated as soon as acorn imported. I suppose we just won\'t have #any code for that case. if otype == "classes" : cellno = max ( [ int ( k [ 2 : ] ) for k in self . shell . user_ns . keys ( ) if re . match ( "_i\\d+" , k ) ] ) elif otype == "functions" : cellno = int ( o . __code__ . co_filename . strip ( "<>" ) . split ( \'-\' ) [ 2 ] ) except : #This must not have been an ipython notebook declaration, so we #don\'t store the code. cellno = None pass code = "" if cellno is not None : cellstr = "_i{0:d}" . format ( cellno ) if cellstr in self . shell . user_ns : cellcode = self . shell . user_ns [ cellstr ] import ast astm = ast . parse ( cellcode ) ab = astm . body parts = { ab [ i ] . name : ( ab [ i ] . lineno , None if i + 1 >= len ( ab ) else ab [ i + 1 ] . lineno ) for i , d in enumerate ( ab ) } if n in parts : celllines = cellcode . split ( \'\\n\' ) start , end = parts [ n ] if end is not None : code = celllines [ start - 1 : end - 1 ] else : code = celllines [ start - 1 : ] #Now, we actually create the entry. Since the execution for function #definitions is almost instantaneous, we just log the pre and post #events at the same time. from time import time from acorn . logging . database import record entry = { "m" : "def" , "a" : None , "s" : time ( ) , "r" : None , "c" : code , } from acorn import msg record ( "__main__.{}" . format ( n ) , entry , diff = True ) msg . info ( entry , 1 )'
34
  }
35
  """
 
36
  arxiv.org/abs/2306.15604
 
15
  ```python
16
  from datasets import load_dataset
17
  xcsn_pt_python_en = load_dataset("ynklab/XCodeSearchNet", data_dir='pretraining/python/en')
18
+ """
19
+ DatasetDict({
20
+ train: Dataset({
21
+ features: ['function_tokens', 'docstring'],
22
+ num_rows: 453623
23
+ })
24
+ validation: Dataset({
25
+ features: ['function_tokens', 'docstring'],
26
+ num_rows: 4596
27
+ })
28
+ test: Dataset({
29
+ features: ['function_tokens', 'docstring'],
30
+ num_rows: 45283
31
+ })
32
+ })
33
+ """
34
  print(xcsn_pt_python_en['train'][0])
35
  """
36
  {
 
43
  ```python
44
  from datasets import load_dataset
45
  xcsn_ft_python_en = load_dataset("ynklab/XCodeSearchNet", data_dir='finetuning/python/en')
46
+ """
47
+ DatasetDict({
48
+ train: Dataset({
49
+ features: ['text'],
50
+ num_rows: 1648684
51
+ })
52
+ validation: Dataset({
53
+ features: ['text'],
54
+ num_rows: 92426
55
+ })
56
+ })
57
+ """
58
  print(xcsn_ft_python_en['train'][0])
59
  """
60
  {
61
  'text': '1<CODESPLIT><CODESPLIT><CODESPLIT>Logs the definition of the object that was just auto - decorated inside the ipython notebook .<CODESPLIT>def _logdef ( self , n , o , otype ) : import re try : #The latest input cell will be the one that this got executed #from. TODO: actually, if acorn got imported after the fact, then #the import would have caused all the undecorated functions to be #decorated as soon as acorn imported. I suppose we just won\'t have #any code for that case. if otype == "classes" : cellno = max ( [ int ( k [ 2 : ] ) for k in self . shell . user_ns . keys ( ) if re . match ( "_i\\d+" , k ) ] ) elif otype == "functions" : cellno = int ( o . __code__ . co_filename . strip ( "<>" ) . split ( \'-\' ) [ 2 ] ) except : #This must not have been an ipython notebook declaration, so we #don\'t store the code. cellno = None pass code = "" if cellno is not None : cellstr = "_i{0:d}" . format ( cellno ) if cellstr in self . shell . user_ns : cellcode = self . shell . user_ns [ cellstr ] import ast astm = ast . parse ( cellcode ) ab = astm . body parts = { ab [ i ] . name : ( ab [ i ] . lineno , None if i + 1 >= len ( ab ) else ab [ i + 1 ] . lineno ) for i , d in enumerate ( ab ) } if n in parts : celllines = cellcode . split ( \'\\n\' ) start , end = parts [ n ] if end is not None : code = celllines [ start - 1 : end - 1 ] else : code = celllines [ start - 1 : ] #Now, we actually create the entry. Since the execution for function #definitions is almost instantaneous, we just log the pre and post #events at the same time. from time import time from acorn . logging . database import record entry = { "m" : "def" , "a" : None , "s" : time ( ) , "r" : None , "c" : code , } from acorn import msg record ( "__main__.{}" . format ( n ) , entry , diff = True ) msg . info ( entry , 1 )'
62
  }
63
  """
64
+ ```
65
  arxiv.org/abs/2306.15604