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

Add full support for Python3.x. #3

Closed
Vol0kin opened this issue May 23, 2020 · 6 comments
Closed

Add full support for Python3.x. #3

Vol0kin opened this issue May 23, 2020 · 6 comments

Comments

@Vol0kin
Copy link
Contributor

Vol0kin commented May 23, 2020

I am trying to create a Docker container where the solver could be run. This container uses the latest version of both Python and NodeJS, which are Python 3.8 and NodeJS 12 iirc.

As you already know, the preprocess_solution.py script has to be run after the planner has completed its execution. However, the script is executed using the python binary, which is a symbolic link to the Python interpreter. This symbolic link may point to python2 or python3, depending on whether Python2.x is installed or not in the OS by default. This means that new OS which don't have python2 installed would have an issue when trying to run the script, and consequently, there would be a problem while trying to run the solver. This happens because of the following reasons:

  1. The way that Python2 and Python3 handle exceptions is different.
  2. The map function returns map object instead of a list in Python3.
  3. Relative imports work differently in both versions.

These issues can be solved while keeping the compatibility between both versions of the language. As a matter of fact, I have already made some modifications to the fork that I have of this repo. I can create a PR so you can review the changes, and then you could decide if you want to integrate them to the project.

@haz
Copy link
Contributor

haz commented May 24, 2020

So there are a few things to note here...

  • The solver is going to undergo some major revision soon so that it is nicely embedded in a custom Docker setup (following what's going on with the planutils project).
  • Moving to python-3 shouldn't be all that problematic, and I don't think we need to stay backwards compatible. In fact, most of the effort has already been put in place here.
  • If you have the changes to bring it to python-3, then by all means throw up a PR! Could still be useful if we end up keeping much of this solver code for the new iteration.

Thanks!

@Vol0kin
Copy link
Contributor Author

Vol0kin commented May 24, 2020

On another note, I've already made a container which runs the solver. I can also add it so you can use it as a baseline for the next iteration. If that is the case, I could open another issue where we could discuss this topic so that we don't end up mixing topics in this one 😆.

@haz
Copy link
Contributor

haz commented May 25, 2020

Great! Well if you wanted to contribute (which would be awesome), what I would advocate is that you check out the existing Docker setup that we'll build off of...

...and the issue created for the solver environment...

...and the discussion that captures how it's going to look...

There's also a WIP PR for it, but that's mainly empty for now while I pick away at the new manifest for plackages.

@haz
Copy link
Contributor

haz commented May 25, 2020

Closing for now (thanks for the PR!), but feel free to join the conversation on the Docker extension either in the issue listed above or the slack org.

@haz haz closed this as completed May 25, 2020
@Vol0kin
Copy link
Contributor Author

Vol0kin commented May 25, 2020

No problem! As far as I have understood, the goal is to create an environment in which multiple planners can be run and run the cloud-solver on top of that environment, right? That way, as stated in issue #1, the solver will be able to use multiple planners.

@haz
Copy link
Contributor

haz commented May 25, 2020

The goal is multi-faceted. But what you include is certainly in there, yep. And the cloud-solver project will wrap many planners / planner services (like generating domains/problems). There will be a new meta-data defined for the solvers, which is reflected in the cloud-solver API automatically, and it will be hosted somewhere with a bit beefier resources (so more than one simultaneous solve can take place).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants