nearai / program_synthesis Goto Github PK
View Code? Open in Web Editor NEWProgram Synthesis
Home Page: http://near.ai
License: Apache License 2.0
Program Synthesis
Home Page: http://near.ai
License: Apache License 2.0
I tried to download the the preprocessed karel dataset using:
wget https://s3.us-east-2.amazonaws.com/karel-dataset/karel.tar.gz
Here's what I get:
--2023-03-31 01:42:06-- https://s3.us-east-2.amazonaws.com/karel-dataset/karel.tar.gz
Resolving s3.us-east-2.amazonaws.com (s3.us-east-2.amazonaws.com)... 52.219.109.185
Connecting to s3.us-east-2.amazonaws.com (s3.us-east-2.amazonaws.com)|52.219.109.185|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2023-03-31 01:42:07 ERROR 403: Forbidden.
Additionally, I tried to access the link using my browser, and the page shows:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>AV0BQYR71EWHN8RP</RequestId>
<HostId>3kpgQibwiHIDK4+t8R9uE+PNEgy+w+UFZbQDrhTnqE7qbJC4F0uzcXnRxdCe5AeEzPVcIYcRx4o=</HostId>
</Error>
It seems like it's outdated.
Maybe can you please reupload the dataset?
Can you please add a license to the repository? Ideally something permissive, like MIT.
Edit: missed it, there's Apache.
Hello, thank you for a great code release,
I'm a phd student interested in using the uast representation of java in my research, is the code to convert java to uast is available? I'm able to run the uast -> java on the naps dataset, but I'm wondering if the other direction, java->uast is also available.
Thank you!
Just curious since I can't find it easily. If not, is there a plan to do so?
Thanks! Feel free to close this issue anytime.
common
/ tools
folderAfter training the model with train.py, I'm getting the below pickling error when running eval.py. The error seems to be coming from the use of the multiprocessing package with the executor module. Please could you advise on this?
python program_synthesis/algolisp/eval.py --model_type=seq2seq --model_dir=models/seq2seq --no-cuda
Evaluation:
Model type: seq2seq
Model path: models/seq2seq
Loaded /data/generated/metaset3.dev.jsonl, total records: 10819
Loaded vocab /data/generated/word.vocab: 331
Loaded vocab /data/generated/word.vocab: 331
Spec2Seq(
(input_embed): Embedding(351, 500)
(output_embed): Embedding(351, 500)
(encoder): SpecEncoder(
(text_encoder): SequenceEncoder(
(embed): Embedding(351, 500)
(encoder): GRU(500, 500, batch_first=True)
)
(proj): Linear(in_features=500, out_features=500, bias=True)
)
(decoder): SeqDecoderAttn(
(embed): Embedding(351, 500)
(decoder): StackedGRU(
(dropout): Dropout(p=0.2, inplace=False)
(layers): ModuleList(
(0): GRUCell(500, 500)
)
)
(out): Linear(in_features=500, out_features=371, bias=False)
(attention): DotProductAttention(
(param_0): Linear(in_features=500, out_features=500, bias=False)
(param_1): Linear(in_features=1500, out_features=500, bias=False)
)
(decoder_proj): Linear(in_features=1000, out_features=500, bias=True)
)
)
Loading model from models/seq2seq/checkpoint
0%| | 0/10819 [00:00<?, ?it/s]/program_synthesis/algolisp/models/prepare_spec.py:30: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
return Variable(t, volatile=volatile)
/program_synthesis/common/modules/decoders.py:183: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
[0 for _ in range(batch_size)]), volatile=True)
/program_synthesis/common/modules/decoders.py:191: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
last_input = Variable(ids, volatile=True)
0%| | 0/10819 [00:00<?, ?it/s]
Traceback (most recent call last):
File "program_synthesis/algolisp/eval.py", line 98, in <module>
evaluate(args)
File "program_synthesis/algolisp/eval.py", line 80, in evaluate
for stats in evaluation.run_inference(eval_dataset, m, current_executor):
File "/program_synthesis/algolisp/dataset/evaluation.py", line 61, in run_inference
for stats in model.worker_pool.imap(get_stats_from_code, zip(results, batch, [executor_]*len(batch))):
File "/usr/src/Python-3.5.9/Lib/multiprocessing/pool.py", line 731, in next
raise value
File "/usr/src/Python-3.5.9/Lib/multiprocessing/pool.py", line 424, in _handle_tasks
put(task)
File "/usr/src/Python-3.5.9/Lib/multiprocessing/connection.py", line 206, in send
self._send_bytes(ForkingPickler.dumps(obj))
File "/usr/src/Python-3.5.9/Lib/multiprocessing/reduction.py", line 50, in dumps
cls(buf, protocol).dump(obj)
AttributeError: Can't pickle local object 'load_default_lisp_units.<locals>.<lambda>'
can you provide the pre-trained weights and model of seq2tree?
Hello,
The NAPS paper says, "Each full solution is accompanied with 2-10 inputs/outputs each split into two groups. The first group can be used in search or can be included into the problem specification
as part of the model input. The second group can be used for the evaluation at the test time."
However in the NAPS dataset, it seems that there is a single list of IO examples with the key 'tests'. How may I distinguish 'search' examples from 'test' examples?
Thanks.
Hi all, thanks for making this open-source! I was tinkering with this and wanted to train the model as per README on AlgoLisp but was running into this:
$ python train.py --model_type=seq2seq --model_dir=models/seq2seq
Traceback (most recent call last):
File "train.py", line 12, in <module>
from program_synthesis.algolisp import models
File "/home/sumith/software/anaconda3/lib/python3.6/site-packages/program_synthesis/algolisp/models/__init__.py", line 2, in <module>
from program_synthesis.algolisp.models import seq2seq_model
File "/home/sumith/software/anaconda3/lib/python3.6/site-packages/program_synthesis/algolisp/models/seq2seq_model.py", line 24, in <module>
from program_synthesis.algolisp.models.base import InferenceResult, MaskedMemory, get_attn_mask
File "/home/sumith/software/anaconda3/lib/python3.6/site-packages/program_synthesis/algolisp/models/base.py", line 19, in <module>
from program_synthesis.algolisp.tools import bleu
File "/home/sumith/software/anaconda3/lib/python3.6/site-packages/program_synthesis/algolisp/tools/__init__.py", line 1, in <module>
from program_synthesis.algolisp.tools.reporter import Reporter
ModuleNotFoundError: No module named 'program_synthesis.algolisp.tools.reporter'
On running train.py of algolisp I get an error of no module existing. Are the init files supposed to be empty? How to solve this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.