Skip to content

Commit

Permalink
Merge pull request #470 from aiplan4eu/add-engines-configuration-space
Browse files Browse the repository at this point in the history
Add static method to Engine class to define its configuration space
  • Loading branch information
alvalentini committed Aug 10, 2023
2 parents d4d3b41 + c522272 commit 6b51ec1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
type: string

env:
up_tamer_commit: "ddcb02f3457b097965d9d4596a972b5bf8f495ff"
up_pyperplan_commit: "124482387cdc5c7a5673ac6ab47002b4ae2fd682"
up_tamer_commit: "c48db20ea5b532437781fd5a539f8d6f830efe2d"
up_pyperplan_commit: "23639395b661a768ba78832c0750ce417c7dc16a"
up_fast_downward_commit: "99dd5bce8f996a9557296644de38bdf94f1dbed8"
up_enhsp_commit: "e0c1567c30fe9eb6ec33bd8fdff24411c817cdee"
up_fmap_commit: "d0e3c0c920b3a515486ae7526c0fba51c75361e1"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pyparsing
networkx
ConfigSpace
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
packages=find_packages(),
include_package_data=True,
python_requires=">=3.8",
install_requires=["pyparsing", "networkx"],
install_requires=["pyparsing", "networkx", "ConfigSpace"],
extras_require={
"dev": ["tarski[arithmetic]", "pytest", "pytest-cov", "mypy"],
"grpc": ["grpcio", "grpcio-tools", "grpc-stubs"],
Expand All @@ -33,8 +33,8 @@
"symk": ["up-symk>=0.0.3"],
"engines": [
"tarski[arithmetic]",
"up-pyperplan==1.0.0",
"up-tamer==1.0.0",
"up-pyperplan==1.0.0.1.dev1",
"up-tamer==1.0.0.1.dev1",
"up-enhsp==0.0.17",
"up-fast-downward==0.2.3",
"up-lpg==0.0.7",
Expand Down
11 changes: 11 additions & 0 deletions unified_planning/engines/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from unified_planning.model.problem_kind import ProblemKind
from unified_planning.engines.credits import Credits
from abc import ABCMeta, abstractmethod, ABC
from ConfigSpace import ConfigurationSpace
from enum import Enum
from typing import Optional

Expand Down Expand Up @@ -148,6 +149,16 @@ def get_credits(**kwargs) -> Optional[Credits]:
"""
return None

@staticmethod
def get_configuration_space(**kwargs) -> ConfigurationSpace:
"""
This method returns the `ConfigurationSpace` for this `Engine`.
A configuration space organizes all hyperparameters and its conditions as well as its forbidden clauses.
All hyperparameters defined in the configuration space must be accepted by the constructor.
"""
return ConfigurationSpace()

def destroy(self):
pass

Expand Down

0 comments on commit 6b51ec1

Please sign in to comment.