Skip to content

approach/setting to control search space of a specific attribute #69

@jakc4103

Description

@jakc4103

Is there any approach/setting to control the search space for value of some specific OP attributes?
For example, any approach to control kernel_size of Conv2d to be in range [1, 15]?

I tried to generate a model with conv2d and relu only, with max_nodes set to 100.
If the timeout_ms was set to 10000 (relativly small number) ms, the solver seems to find nothing, then model_gen failed with following errors.
If timeout_ms set to 3000000 (a large number) ms, the entire model_gen process takes a very long time to generate a single model

  File "/venv/test/bin/nnsmith.model_gen", line 8, in <module>
    sys.exit(main())
  File "/venv/test/lib/python3.8/site-packages/hydra/main.py", line 90, in decorated_main
    _run_hydra(
  File "/venv/test/lib/python3.8/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/venv/test/lib/python3.8/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/venv/test/lib/python3.8/site-packages/hydra/_internal/utils.py", line 222, in run_and_report
    raise ex
  File "/venv/test/lib/python3.8/site-packages/hydra/_internal/utils.py", line 219, in run_and_report
    return func()
  File "/venv/test/lib/python3.8/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/venv/test/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
  File "/venv/test/lib/python3.8/site-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/venv/test/lib/python3.8/site-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/venv/test/lib/python3.8/site-packages/nnsmith/cli/model_gen.py", line 57, in main
    f"{len(gen.last_solution)} symbols and {len(gen.solver.assertions())} constraints."
TypeError: object of type 'NoneType' has no len()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions