hu-macsy / simexpal

Simplifying Experimental Algorithmics
https://simexpal.readthedocs.io
MIT License
17 stars 18 forks source link

Document: Fileless Instance #130

Closed c-bebop closed 10 months ago

c-bebop commented 1 year ago

When I try setting up a file less instance as described under: https://github.com/hu-macsy/simexpal/blob/master/docs/instances.rst#fileless-instances I can't actually set a file less instance up as described. In my case I have a file less instance defined as follows:

  - repo: local
    set: [random]
    items:
      - name: random_graph
        files: []
        extra_args: ['--rand_g', '-d', 'instances/']

I am using the random instance set under instsets under the matrix map. When trying to launch my experiments simex throws the following error:

RuntimeError: The instance 'random_graph' is fileless
duylethanh commented 1 year ago

Can you post your experiments key? (at least the experiments that are supposed to use your fileless instance)

c-bebop commented 1 year ago

In this case it was the following:

  - name: static_init_memory
    use_builds: [benchmark]
    args: ['benchmark', '-a', 'none', '@EXTRA_ARGS@', 'file', '-p', '@INSTANCE@']
    stdout: out
    timeout: 1800
    num_threads: 36

But I figured, that the whole experiment setup was not what I desired so I am trying it another way now (with actual file instances). But I was still confused when looking at the documentation and my experiment setup: why it wouldn't work together.

duylethanh commented 1 year ago

Ah, the problem is that you are using @INSTANCE@ for a fileless instance. There is some discussion in the PR #127. The main point is that we should improve the documentation by adding an extra section "Experiments with Fileless Instances" stating how to correctly set up experiments with fileless instances.

c-bebop commented 1 year ago

Thanks for the reply, I've got it working as follows:

  - name: random_graph_generation
    use_builds: [randgraph]
    args: ['randgraph', '-e', 'random_graph_generation', '@EXTRA_ARGS@']
    stdout: out
    timeout: 1800
    num_threads: 36

...

instances:
  - repo: local
    set: [file_less]
    items:
      - name: no_file
        files: []

As you say, it's without the @INSTANCE@ key. Makes sense, but not documented yet.

c-bebop commented 1 year ago

I changed the title so it's clear that file less instances are working but shall be documented.

bernlu commented 1 year ago

we should modify the error text in this line: https://github.com/hu-macsy/simexpal/blob/master/simexpal/launch/common.py#L350 to mention the '@INSTANCE@' problem.