devlooper icon indicating copy to clipboard operation
devlooper copied to clipboard

TypeError: _Image._from_args() got an unexpected keyword argument 'dockerfile_commands'

Open simonw opened this issue 1 year ago • 5 comments

The dockerfile_commands= parameter was removed in this commit: https://github.com/modal-labs/modal-client/commit/8dbe0e65be9b46a19d38114d1470456706c6e3b3

Refs:

  • https://github.com/modal-labs/modal-client/pull/1584

Affected code:

https://github.com/modal-labs/devlooper/blob/4140c87fc29ee16b09300846e371ba6584a8c092/src/env_templates.py#L44

https://github.com/modal-labs/devlooper/blob/4140c87fc29ee16b09300846e371ba6584a8c092/src/env_templates.py#L65

simonw avatar Jul 26 '24 21:07 simonw

I tried working around this like so:

diff --git a/src/env_templates.py b/src/env_templates.py
index 73f288b..39f31c9 100644
--- a/src/env_templates.py
+++ b/src/env_templates.py
@@ -41,7 +41,7 @@ TEMPLATES = {
         workdir="/app",
         image=(
             # modal.Image.from_registry("rust:slim", setup_modal_client=False)
-            modal.Image._from_args(dockerfile_commands=["FROM rust:slim"])
+            modal.Image.from_registry("rust:slim")
             .apt_install("build-essential")
             .run_commands("cargo new app --bin")
             .workdir("/app")
@@ -61,8 +61,7 @@ TEMPLATES = {
         test_cmd="yarn run jest --bail",
         workdir="/app",
         image=(
-            # modal.Image.from_registry("node:slim", setup_modal_client=False)
-            modal.Image._from_args(dockerfile_commands=["FROM node:slim"])
+            modal.Image.from_registry("node:slim")
             .run_commands("yarn create vite app --template react")
             .workdir("/app")
             .run_commands(

I got a different error then:

openai.error.InvalidRequestError: The model gpt-3.5-turbo-0613 has been deprecated

simonw avatar Jul 26 '24 21:07 simonw

Also this deprecation warning:

/root/src/main.py:26: DeprecationError: 2024-04-29: The use of "Stub" has been deprecated in favor of "App". This is a pure name change with no other implications.

simonw avatar Jul 26 '24 22:07 simonw

It looks like the GPT-3.5 error is in /usr/local/lib/python3.11/site-packages/smol_dev/prompts.py", line 36, in specify_file_paths

That version is installed here: https://github.com/modal-labs/devlooper/blob/4140c87fc29ee16b09300846e371ba6584a8c092/src/main.py#L28-L33

Looks like that package hasn't had an update in a while: https://github.com/smol-ai/developer/commits/main/

simonw avatar Jul 26 '24 22:07 simonw

I think the GPT-3.5 error comes from functions being deprecated and replaced with tools by OpenAI.

nathanielmhld avatar Aug 04 '24 01:08 nathanielmhld

think i just pushed a fix, give it another a try!

kning avatar Sep 19 '24 19:09 kning