Skip to content

Commit

Permalink
Version 0.5.0: Use Fast Downward 24.06
Browse files Browse the repository at this point in the history
* use Fast Downward 24.06

* document underlying Fast Downward version in README

* update development status to stable

* replace deprecated package pkg_resources

* require python >= 3.9
  • Loading branch information
roeger authored Dec 18, 2024
1 parent f12666c commit 59f9d5f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-win_amd64
CIBW_BUILD: cp39-win_amd64

- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
strategy:
matrix:
version:
- {os: windows-2019, python: '3.8'}
- {os: windows-2019, python: '3.9'}
- {os: windows-2022, python: '3.10'}
steps:
- name: Clone repository
Expand Down
12 changes: 9 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Release notes

UP Fast Downward 0.5.0
- use Fast Downward 24.06
- replace internal usage of deprecated package pkg_resources
- require Python >= 3.9

UP Fast Downward 0.4.2
- Update packaging (using pyproject.toml)
- update packaging (using pyproject.toml)

UP Fast Downward 0.4.1
- Generate Python wheels compatible with Mac Apple Silicon M1/M2
- Update README.md (current state of development and default configurations)
- generate Python wheels compatible with Mac Apple Silicon M1/M2
- update README.md (current state of development and default configurations)

UP Fast Downward 0.4.0
- fix bug in fast-downward-reachability grounder (number of parameters)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ Details on the reachability analysis and the normalization can be found in Malte


## Current state of the system and ongoing development

- Fast Downward version: 2024.06
- since up-fast-downward 0.5.0: 2024.06
- up-fast-downward 0.3.x, 0.4.x: 2023.06
- Default configuration
- ```fast-downward``` engine: lama-first for One-Shot planning, seq-sat-lama-2011 for Anytime planning
- ```fast-downward-opt``` engine: A* search with LMCut heuristic
Expand Down
2 changes: 1 addition & 1 deletion misc/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ changedir = {toxinidir}/tests/
deps =
pytest
up-fast-downward
unified-planning >= 1.0.0.168.dev1
unified-planning >= 1.1.0
commands =
pytest test-simple.py
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[project]
name = "up_fast_downward"
version = "0.4.2"
version = "0.5.0"
description = "Unified Planning Integration of the Fast Downward planning system"
readme = {text = "This package makes the [Fast Downward](https://www.fast-downward.org/) planning system available in the [unified_planning library](https://github.com/aiplan4eu/unified-planning).", content-type = "text/markdown"}
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {text = "GPL-3.0-only"}
authors = [
{name = "UNIBAS Team"},
Expand All @@ -13,7 +13,7 @@ maintainers = [
]
dependencies = ["setuptools>=59.6.0"]
classifiers = [
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
Expand Down
2 changes: 1 addition & 1 deletion up_fast_downward/_custom_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def clone_and_compile_fast_downward():
FAST_DOWNWARD_REPO = 'https://github.com/aibasel/downward.git'
FAST_DOWNWARD_RELEASE = 'release-23.06'
FAST_DOWNWARD_RELEASE = 'release-24.06'
#FAST_DOWNWARD_RELEASE = None
# CHANGESET is ignored if release is not None
FAST_DOWNWARD_CHANGESET = 'bd3c63647a42c9a5f103402615ca991d23a88d55'
Expand Down
25 changes: 15 additions & 10 deletions up_fast_downward/fast_downward.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pkg_resources
import importlib.resources
import sys
import unified_planning as up
from typing import Callable, Iterator, IO, List, Optional, Tuple, Union
Expand Down Expand Up @@ -46,15 +46,20 @@ def __init__(
self._guarantee_metrics_task = ResultStatus.SOLVED_SATISFICING

def _base_cmd(self, plan_filename: str):
downward = pkg_resources.resource_filename(
__name__, "downward/fast-downward.py"
)
assert sys.executable, "Path to interpreter could not be found"
cmd = [sys.executable, downward, "--plan-file", plan_filename]
if self._fd_search_time_limit is not None:
cmd += ["--search-time-limit", self._fd_search_time_limit]
cmd += ["--log-level", self._log_level]
return cmd
loc = "downward/fast-downward.py"
downward_res = importlib.resources.files("up_fast_downward").joinpath(loc)
with importlib.resources.as_file(downward_res) as downward:
# This will clean up any temporary files created for accessing
# downward once we leave the with statement. Since the resource is
# not packed into a zip file or anything, this should be save
# enough. Otherwise, we need to explore an atexit handler:
# cf https://importlib-resources.readthedocs.io/en/latest/migration.html
assert sys.executable, "Path to interpreter could not be found"
cmd = [sys.executable, downward, "--plan-file", plan_filename]
if self._fd_search_time_limit is not None:
cmd += ["--search-time-limit", self._fd_search_time_limit]
cmd += ["--log-level", self._log_level]
return cmd

def _get_cmd(
self, domain_filename: str, problem_filename: str, plan_filename: str
Expand Down

0 comments on commit 59f9d5f

Please sign in to comment.