rough-engineer-58925
11/12/2024, 6:16 PMlanggraph
for building AI agentic workflows**. The team behind langgraph provide options for deploying agents in their cloud.
Currently they only support the following two options:
• Codebases thats use requirements.txt
(docs).
• Codebases that use pyproject.toml
(docs).
Our setup is a (1) monorepo, (2) we use protobuffs. I am looking into how I can make pants work under my constraints.
** Langgraph is the defacto framework for building AI agents.rough-engineer-58925
11/12/2024, 6:20 PMrequirements.txt
before deployment. However, I don't know how I can materialize the python generated code.
I am aware that I can use pants export-codegen ::
but this write code under dist/codegen
. This means I have write my imports as import dist.codegen.<rest>
which is not ideal.silly-queen-7197
11/12/2024, 11:52 PMsilly-queen-7197
11/12/2024, 11:58 PMrough-engineer-58925
11/13/2024, 4:07 PMadhoc_tool
seem like something that could be useful. I could write a rule that copies the source files, run proto compiler, and generate the requirements.txt.rough-engineer-58925
11/13/2024, 4:08 PMhttps://www.pantsbuild.org/dev/reference/subsystems/python#default_run_goal_use_sandboxMy expectation was that if I use this option. If I do
pants test ::
the proto generated code won't be generated in a sandbox, but nothing was in the source directory.
What's the expected outcome?silly-queen-7197
11/14/2024, 12:22 AM"description": "Whether to use a sandbox when `run`ning this target. Defaults to `[python].default_run_goal_use_sandbox`.\n\nIf true, runs of this target with the `run` goal will copy the needed first-party sources into a temporary sandbox and run from there.\n\nIf false, runs of this target with the `run` goal will use the in-repo sources directly.\n\nNote that this field only applies when running a target with the `run` goal. No other goals (such as `test`, if applicable) consult this field.\n\nThe former mode is more hermetic, and is closer to building and running the source as it were packaged in a `pex_binary`. Additionally, it may be necessary if your sources depend transitively on \"generated\" files which will be materialized in the sandbox in a source root, but are not in-repo.\n\nThe latter mode is similar to creating, activating, and using a virtual environment when running your files. It may also be necessary if the source being run writes files into the repo and computes their location relative to the executed files. Django's `makemigrations` command is an example of such a process.",
Looking at it now the "run" in the default_run_goal_use_sandbox
really sticks out.