Skip to main content

General library for setting up linux-based environments for developing, running, and evaluating planners.

Project description

planutils

General library for setting up linux-based environments for developing, running, and evaluating planners.

1. Docker

The included Docker file will come with planutils pre-installed. Note that in order to run a number of the planners (all those that are based on singularity), you will need to run the docker with the --privileged option.

Build planutils images docker build -t planutils:latest .

Run the plautils container docker run -it --privileged planutils bash

Active the planutils environment planutils activate

2. Usage

Example of currently working functionality

$ lama domain.pddl problem.pddl

Package not installed!
  Download & install? [Y/n] y

About to install the following packages: downward (36M), lama (20K)
  Proceed? [Y/n] y
Installing downward...
INFO:    Downloading shub image
 35.88 MiB / 35.88 MiB [=======================================] 100.00% 3.99 MiB/s 8s
Finished installing downward (size: 36M)
Installing lama...
Finished installing lama (size: 20K)
Successfully installed lama!

Original command: lama
  Re-run command? [Y/n] y

Parsing...
$

Example of upcoming functionality

$ planutils install ipc-2018
Installing planners
This will require 3Gb of storage. Proceed? [Y/n]
Fetching all of the planners from IPC-2018 for use on the command line...

$ planutils install server-environment
Setting up a webserver to call the installed planners...

$ planutils install development-environment
Installing common dependencies for building planners...
Installing common planning libraries...

$ planutils install planning-domains
Installing the command-line utilities...
Installing the python library...
Fetching default benchmarks...

$ planutils setup-evaluation configuration.json
Installing Lab...
Configuring Lab...
Ready!
Run eval.py to evaluate

$

3. Add a new package

Package Configuration

  1. Create a folder for new pacakeg, the package name will be the used to call the planner later
  2. Set up the install, run, uninstall, and manifest file. You can find the template files under packages/TEMPLATE folder

Write Manifest file

Please create a manifest file named manifest_compact.json if you want to use predefined templates in the packages/TEMPLATE/SERVICE_TEMPLATE folder. The full manifest.json will be generated at the run time. You can overwrite the dafult template by restating the value of json fields.

You can also create a manifest.json file directly if you don't need the template.

Manifest Example

{
    "name": "LAMA-FIRST",
    "description": "http://fast-downward.org/",
    "install-size": "20K",
    "dependencies": [
        "downward"
    ],
    "endpoint": {
        "services": {
            "solve": {
                "args": [
                    {
                        "name": "domain",
                        "type": "file",
                        "description": "domain file"
                    },
                    {
                        "name": "problem",
                        "type": "file",
                        "description": "problem file"
                    }
                ],
                "call": "lama-first {domain} {problem}",
                "return": {
                    "type": "generic",
                    "files": "*plan*"
                }
            }
        }
    }
}

Define Args

There are four types of Args: file, int, string and,categorical. You can add default value for int,string, and categorical arguments

 "args": [
    {
        "name": "domain",
        "type": "file",
        "description": "domain file"
    },
    {
        "name": "number_of_plans",
        "type": "int",
        "description": "Number of Plans",
        "default":3
    },
    {
        "name": "custom_search_algorithm",
        "type": "string",
        "description": "Custom Search Algorithm",
        "default":"kstar(blind(),k=1)"
    },
    {
        "name": "search_algorithm",
        "type": "categorical",
        "description": "Search Algorithm",
        "choices":[
          {
            "display_value":"Kstar Blind k=1",
            "value":"kstar(blind(),k=1)"
          },
          {
            "display_value":"Kstar Blind k=2",
            "value":"kstar(blind(),k=2)"
          }
        ],
        "default":"kstar(blind(),k=1)"
    }
]

Define Return Types

There are three types of return data: generic, json and log. The generic type should be used for all the text based result, the log type should be used for planner like Optic and Tfd which didn't generate a proper plan, and the type json should used for plan in JSON format.

For the value of files, you will have to write a glob pattern. Planning-as-service backend uses glob libary to find and return all the files that matched.

"return": {
                    "type": "generic/log/json",
                    "files": "*plan*"
                }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

planutils-0.7.7.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

planutils-0.7.7-py3-none-any.whl (53.5 kB view details)

Uploaded Python 3

File details

Details for the file planutils-0.7.7.tar.gz.

File metadata

  • Download URL: planutils-0.7.7.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for planutils-0.7.7.tar.gz
Algorithm Hash digest
SHA256 de073f7c470042edbff6356c750a917930c88a045d8b8e98feb5cee3f0fa16b2
MD5 313755976279c3e48b211ca3a872c1c2
BLAKE2b-256 e328f4527ae78f728e91fc23b1c734ae7745ed140753d01f675e5b5ba447749d

See more details on using hashes here.

Provenance

File details

Details for the file planutils-0.7.7-py3-none-any.whl.

File metadata

  • Download URL: planutils-0.7.7-py3-none-any.whl
  • Upload date:
  • Size: 53.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for planutils-0.7.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b08bc0e6af81ec9bfc04bb435f4d49da9f6b5fa6ad949163c6771b3d7f5d53d5
MD5 bdb8c57f91a38ddf84b3e01a10102d48
BLAKE2b-256 e30c79593b4b9c4695a9fa5952484735d4f4288d6f71d5c4329949609d94ec68

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page