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

Integrate VirtualEnv Management into Component #280

Closed
nickjalbert opened this issue Mar 1, 2022 · 2 comments · Fixed by #296
Closed

Integrate VirtualEnv Management into Component #280

nickjalbert opened this issue Mar 1, 2022 · 2 comments · Fixed by #296
Assignees

Comments

@nickjalbert
Copy link
Contributor

Right now, the virtualenv management is completely separated from the Component lifecycle. For example, in the CLI, we:

  1. Get the virtualenv
  2. Activate the virtualenv
  3. Get the Component
  4. Run the Component's entry point

However, there's duplicate work going on here because to get the virtualenv (step 1), we need to construct the Component DAG to find all the requirements files associated with the Components. That DAG then gets tossed and then reconstructed in step 3 to get Component.

This implementation was chosen due to some awkwardness around Component instantiation: you need the virtualenv before you import the managed class, and currently Component eagerly imports the managed class in a way that makes it difficult to fully construct the virtualenv beforehand.

However, with the changes proposed in #276, virtualenv management becomes much cleaner as something that happens completely within the Component. This also makes REPL based demos cleaner.

@nickjalbert
Copy link
Contributor Author

@andyk FYI with the merge of #293, I'm going to work on this.

@andyk
Copy link
Contributor

andyk commented Mar 3, 2022

Excellent! Happy to chat about the design a little more too if that would be helpful.

nickjalbert added a commit to nickjalbert/agentos that referenced this issue Mar 3, 2022
nickjalbert added a commit to nickjalbert/agentos that referenced this issue Mar 3, 2022
@andyk andyk moved this to Done in Sprint 0.2.0 Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants