Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle ENHSP-2020 returned plans as logs #137

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

nirlipo
Copy link
Collaborator

@nirlipo nirlipo commented Feb 9, 2024

Output plan is not compliant with our current adaptor in the solver online, so we need to change it to parse it as a log file.

Relevant code that parses plan files returned a structured json file: https://github.com/AI-Planning/planning-as-a-service/blob/master/server/api/adaptor/planning_editor_adaptor/adaptor.py#L41

Otherwise, enhsp-2020 returns the following error:

usage: planutils [-h] {install,uninstall,run,remote,remote-list,check-installed,server,list,setup,upgrade,configure,show} ... planutils: error: unrecognized arguments: -o domain -f problem ', 'call': 'timeout 30 planutils run enhsp-2020 -o domain -f problem >> plan'

Test session for the editor: https://editor.planning.domains/#read_session=5FYdqT4OKG

Once this PR is merged, we need to update the check that the update in planutils propagates to docker, and the online server service.

In the future we may want to add a parser for temporal and numeric plans.

Output plan is not compliant with our current adaptor in the solver online, so we need to change it to parse it as a log file.

Relevant code that parse plan files to returned a structured json file:
https://github.com/AI-Planning/planning-as-a-service/blob/master/server/api/adaptor/planning_editor_adaptor/adaptor.py#L41
@nirlipo nirlipo added the bug Something isn't working label Feb 9, 2024
@nirlipo nirlipo requested a review from haz February 9, 2024 04:56
@haz haz merged commit b2f270f into main Feb 9, 2024
1 check passed
@haz
Copy link
Contributor

haz commented Feb 9, 2024

@nirlipo Should be updated in pypi and dockerhub.

@nirlipo
Copy link
Collaborator Author

nirlipo commented Feb 12, 2024

I've deployed in the server but I'm getting the same error only when the command run is:

(planutils) root@837cf2649eb5:~$ planutils run enhsp-2020 -o domain.pddl -f problem.pddl 
usage: planutils [-h]
                 {install,uninstall,run,remote,remote-list,check-installed,server,list,setup,upgrade,configure,show}
                 ...
planutils: error: unrecognized arguments: -o domain.pddl -f problem.pddl

but when I remove planutils run then it works

(planutils) root@837cf2649eb5:~$ enhsp-2020 -o domain.pddl -f problem.pddl 

The above happens when testing the docker image planutils:latest, after manual installation of enhsp-2020.

When I test the worker image instead, I get:


root@d711fdb1603c:/queue# vim domain.pddl
root@d711fdb1603c:/queue# vim problem.pddl
root@d711fdb1603c:/queue# planutils run enhsp-2020 -o domain.pddl -f problem.pddl
usage: planutils [-h]
                 {install,uninstall,run,remote,remote-list,check-installed,server,list,setup,upgrade,configure,show}
                 ...
planutils: error: unrecognized arguments: -o domain.pddl -f problem.pddl
root@d711fdb1603c:/queue# enhsp-2020 -o domain.pddl -f problem.pddl
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/logging/Logger
        at com.hstairs.ppmajal.domain.PddlDomain.parseDomain(PddlDomain.java:172)
        at com.hstairs.ppmajal.domain.PddlDomain.<init>(PddlDomain.java:81)
        at planners.ENHSP.parseDomainProblem(ENHSP.java:114)
        at planners.ENHSP.parsingDomainAndProblem(ENHSP.java:141)
        at main.main(main.java:32)
Caused by: java.lang.ClassNotFoundException: java.util.logging.Logger
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 5 more

Any intuition on what's going on, it is strange that some java dependencies are missing?

@haz
Copy link
Contributor

haz commented Feb 13, 2024

Ya, the -o argument is being captured by the planutils argparse. You could do planutils run enhsp-2020 "-o domain.pddl -f problem.pddl", and it would work.

nirlipo added a commit that referenced this pull request Feb 19, 2024
This was referenced Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants