Skip to content

Using Pythonx from a multi-node deployment #26

Description

@Ch4s3

We're trying to use pythonx to execute a pre-trained forecasting model. Our app has a few node running on k8s.

Here's our config:

config :pythonx, :uv_init,
  pyproject_toml: """
  [project]
  name = "prophet"
  version = "0.0.0"
  requires-python = "==3.13.*"
  dependencies = [
    "prophet>=1.1",
    "pandas>=2.3",
    "numpy>=2.3"
  ]
  """

It works when we run it locally and our docker image has python installed.

However trying to run pythonx fails as follows

> Pythonx.eval("print(1)", %{})
** (ArgumentError) decode failed, expected a local pid

It looks like the NIF is checking to see if the node calling Pythonx is on the same node.

Is there a correct way to do this, or are we using it wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions