dkamm / deepcoder Goto Github PK
View Code? Open in Web Editor NEWDeepcoder paper implementation
License: MIT License
Deepcoder paper implementation
License: MIT License
Hi,
You have changed options in gen_program.py but your readme is not updated. Can you please update it.
I am getting following errro-
gen-programs.py: error: unrecognized arguments: --max_nb_prog 100000 --out deepcoder/dataset/programs_small.txt
Test programs are semantically disjoint from train programs where T_train <= T_test.
Each training set is composed of programs of length T (not <= T).
can't find the file gen-examples in deepcoder/scripts
Any thoughts on extending the DSL to incorporate:
i. user defined function(s) from the existing DSL functions and lambdas?
ii. recursion?
Thanks in advance!
I got this error running: ./deepcoder/scripts/gen-datasets.sh
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function <lambda> at 0x7fb178651c10>: attribute lookup <lambda> on deepcoder.dsl.impl failed
I am on OS X Monterey 12.1 Beta, in a tensorflow-metal virtual environment.
% python --version
Python 3.8.5
% ./deepcoder/scripts/gen-datasets.sh
+ set -e
+ PROG_LENS=(1 2 3 4 5)
+ NB_TRAINS=(1000000 1000000 5000000 5000000 0)
+ NB_TESTS=(100 100 500 100 100)
+ NB_INPUTS=3
+ for idx in '${!PROG_LENS[*]}'
+ PROG_LEN=1
+ NB_TRAIN=1000000
+ NB_TEST=100
+ echo 'Generating programs T=1 #train=1000000 #test=100'
Generating programs T=1 #train=1000000 #test=100
+ OUT_PREFIX=T=1
+ TRAIN_PROG=T=1_train_programs.txt
+ TEST_PROG=T=1_test_programs.txt
+ TRAIN_OUT=T=1_train.json
+ TEST_OUT=T=1_test.json
+ python -m deepcoder.scripts.gen-programs --nb_inputs 3 --nb_train 1000000 --nb_test 100 --prog_len 1 --train_out T=1_train_programs.txt --test_out T=1_test_programs.txt --enforce_disjoint
Traceback (most recent call last):
File "/Users/davidlaxer/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/davidlaxer/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/davidlaxer/deepcoder/deepcoder/scripts/gen-programs.py", line 97, in <module>
main()
File "/Users/davidlaxer/deepcoder/deepcoder/scripts/gen-programs.py", line 48, in main
programs = enumerate_programs(input_type_combinations, args.prog_len,
File "/Users/davidlaxer/deepcoder/deepcoder/search.py", line 195, in enumerate_programs
worker.start()
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Users/davidlaxer/anaconda3/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function <lambda> at 0x7fb178651c10>: attribute lookup <lambda> on deepcoder.dsl.impl failed
Hello, under what license is this project released under ? I would like to study it to learn from it. Thank you.
Current implementation is too slow beyond just python.
T=3, 100 programs
their implementation:
dfs - 500us
sort-and-add - 1ms
mine:
dfs - 38s
sort-and-add - 2640s
dfs slowdown: 76000x
sort-and-add slowdown: 2640000x
Want to get the slowdown to ~100x range (just python)
possible reasons:
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.