logic-and-learning-lab / ilp-experiments

Experimentation framework for Popper
MIT License
20 stars 4 forks source link

Problem running BASIC_TEST (and other tests) #18

Open hakank opened 2 years ago

hakank commented 2 years ago

I'm trying to run more advanced examples but got some errors.

The fast test works without any problem:

$ python3 ilpexp.py FAST_TEST

Running trains1__popper
trains1__popper completed in 0.586s
trains1__popper :: 0.59s :: 1.0
Results for 1 instances written to /home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/results/results.json

But running any other tests yield alot of error. For example BASIC_TEST:

$ python3 ilpexp.py BASIC_TEST

Running iggp-coins__popper__3

Running iggp-minimaldecay__popper__3
Exception in instance iggp-coins__popper__3
Traceback (most recent call last):
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/runner/simple.py", line 83, in run_instance
    result = instance.run()
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/problem/problem.py", line 43, in run
    (program, total_exec_time, conf_matrix, extra_stats) =  self.system.run(self.train_settings, self.test_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/system.py", line 12, in run
    (solution, total_exec_time, extra_stats) = self.train(train_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/popper/popper.py", line 49, in train
    with open(train_settings.stats_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: './results/iggp-coins/popper/3/stats.json'
--- Logging error ---
Traceback (most recent call last):
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/runner/simple.py", line 83, in run_instance
    result = instance.run()
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/problem/problem.py", line 43, in run
    (program, total_exec_time, conf_matrix, extra_stats) =  self.system.run(self.train_settings, self.test_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/system.py", line 12, in run
    (solution, total_exec_time, extra_stats) = self.train(train_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/popper/popper.py", line 49, in train
    with open(train_settings.stats_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: './results/iggp-coins/popper/3/stats.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/logging/__init__.py", line 1025, in emit
    msg = self.format(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 869, in format
    return fmt.format(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 608, in format
    record.message = record.getMessage()
  File "/usr/local/lib/python3.7/logging/__init__.py", line 369, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.7/multiprocessing/spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "/usr/local/lib/python3.7/multiprocessing/spawn.py", line 118, in _main
    return self._bootstrap()
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/runner/simple.py", line 87, in run_instance
    logger.error("Unexpected error:", sys.exc_info()[0])
Message: 'Unexpected error:'
Arguments: (<class 'FileNotFoundError'>,)
Process iggp-coins__popper__3:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/runner/simple.py", line 88, in run_instance
    raise e
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/runner/simple.py", line 83, in run_instance
    result = instance.run()
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/problem/problem.py", line 43, in run
    (program, total_exec_time, conf_matrix, extra_stats) =  self.system.run(self.train_settings, self.test_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/system.py", line 12, in run
    (solution, total_exec_time, extra_stats) = self.train(train_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/popper/popper.py", line 49, in train
    with open(train_settings.stats_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: './results/iggp-coins/popper/3/stats.json'
Exception in instance iggp-minimaldecay__popper__3
Traceback (most recent call last):
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/runner/simple.py", line 83, in run_instance
    result = instance.run()
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/problem/problem.py", line 43, in run
    (program, total_exec_time, conf_matrix, extra_stats) =  self.system.run(self.train_settings, self.test_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/system.py", line 12, in run
    (solution, total_exec_time, extra_stats) = self.train(train_settings)
  File "/home/hakank/inductive_programming/andrewcropper/popper/ilp-experiments/ilpexp/system/popper/popper.py", line 49, in train
    with open(train_settings.stats_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: './results/iggp-minimaldecay/popper/3/stats.json'
...

My system:

celinehocquette commented 2 years ago

Hi Hakan,

Thanks for pointing out this issue. The main version of Popper is not anymore compatible with this ilp experimentation repository. I suggest you use MagicPopper (which acts as Popper if no magic value declarations are provided), until we update the main Popper repository.

hakank commented 2 years ago

Thanks for the info, Céline.

However, I stumbled upon some problems with MagicPopper and will file an issue about that.