shini-tm / neural_sketch

neural sketch project, currently in generative regex, list transformation (deepcoder), and text editing (robustfill) domains
0 stars 0 forks source link

import calls appear mislabelled or i'm missing something about the path structure #2

Open shini-tm opened 4 years ago

shini-tm commented 4 years ago

running anaconda-project run python main_supervised_deepcoder.py --pretrain returns ModuleNotFoundError's for algolisp.dataset.

We changed the import calls from: from program_synthesis.algolisp.dataset import data to: from program_synthesis.program_synthesis.algolisp.dataset import data

however now we are currently facing a missing module called IPython in

Traceback (most recent call last):
  File "train/deepcoder_train_dc_model.py", line 29, in <module>
    from data_src.makeDeepcoderData import batchloader
  File "/home/shini/GitHub/neural_sketch/data_src/makeDeepcoderData.py", line 9, in <module>
    from util.algolisp_util import make_holey_algolisp
  File "/home/shini/GitHub/neural_sketch/util/algolisp_util.py", line 31, in <module>
    from program_synthesis.program_synthesis.algolisp.dataset import data
  File "/home/shini/GitHub/neural_sketch/program_synthesis/program_synthesis/algolisp/dataset/__init__.py", line 2, in <module>
    from program_synthesis.program_synthesis.algolisp.dataset import dataset
  File "/home/shini/GitHub/neural_sketch/program_synthesis/program_synthesis/algolisp/dataset/dataset.py", line 19, in <module>
    from program_synthesis.program_synthesis.algolisp.dataset import data
  File "/home/shini/GitHub/neural_sketch/program_synthesis/program_synthesis/algolisp/dataset/data.py", line 13, in <module>
    from IPython.lib import pretty
ModuleNotFoundError: No module named 'IPython'

Note: all import calls prior to IPython are the program_synthesis.algolisp calls (that were changed to program_synthesis.program_synthesis.algolisp)

shini-tm commented 4 years ago

alternatively running python train/deepcoder_train_dc_model.py gives us different errors: Traceback (most recent call last): File "train/deepcoder_train_dc_model.py", line 12, in <module> import torch ModuleNotFoundError: No module named 'torch'

shini-tm commented 4 years ago

after installing IPython, we got more import call errors for program_synthesis.algolisp:

Traceback (most recent call last):
  File "train/deepcoder_train_dc_model.py", line 29, in <module>
    from data_src.makeDeepcoderData import batchloader
  File "/home/shini/GitHub/neural_sketch/data_src/makeDeepcoderData.py", line 9, in <module>
    from util.algolisp_util import make_holey_algolisp
  File "/home/shini/GitHub/neural_sketch/util/algolisp_util.py", line 32, in <module>
    from program_synthesis.program_synthesis.algolisp.dataset import executor
  File "/home/shini/GitHub/neural_sketch/program_synthesis/program_synthesis/algolisp/dataset/executor.py", line 5, in <module>
    from program_synthesis.algolisp.dataset import code_lisp
ModuleNotFoundError: No module named 'program_synthesis.algolisp'
shini-tm commented 4 years ago

and in : File ``` "/home/shini/GitHub/neural_sketch/program_synthesis/program_synthesis/algolisp/dataset/code_lisp.py", line 7, in from program_synthesis.algolisp.dataset.code_types import *

shini-tm commented 4 years ago

and last but not least :

 File "/home/shini/GitHub/neural_sketch/program_synthesis/program_synthesis/algolisp/dataset/code_types.py", line 3, in <module>
    from program_synthesis.algolisp.dataset.code_base import Node, MetaNode