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

Container crashes when trying to create description #1

Closed
ivalmian opened this issue Nov 23, 2020 · 1 comment
Closed

Container crashes when trying to create description #1

ivalmian opened this issue Nov 23, 2020 · 1 comment

Comments

@ivalmian
Copy link

ivalmian commented Nov 23, 2020

Hi,

Trying to run this on Mac OS X Catalina (MBP 15" 2018)

Running Docker Desktop, tried launch the container CPU-only. It downloads/launches fine but crashes when I tried to use the extension in vscode.

The function I am trying to summarize is

def plus(a: int, b:int) -> int: return a+b

Although it crashed on other functions too

Here are the two errors I get

[INFO 13:13:23.064] Generating Docstring at line: 2
[INFO 13:13:23.067] Docstring generated:
    """${1:AI is creating summary for plus}

    Args:
        a (${2:int}): ${3:[description]}
        b (${4:int}): ${5:[description]}

    Returns:
        ${6:int}: ${7:[description]}
    """
[INFO 13:13:23.067] Inserting at position: 2 0
[INFO 13:13:23.081] Successfully inserted docstring
[ERROR 13:13:23.084] Error: connect ECONNREFUSED 127.0.0.1:5000

another time it was this:

[INFO 13:15:19.118] Generating Docstring at line: 2
[INFO 13:15:19.120] Docstring generated:
    """${1:AI is creating summary for plus}

    Args:
        a (${2:int}): ${3:[description]}
        b (${4:int}): ${5:[description]}

    Returns:
        ${6:int}: ${7:[description]}
    """
[INFO 13:15:19.120] Inserting at position: 2 0
[INFO 13:15:19.127] Successfully inserted docstring
[ERROR 13:15:32.992] Error: socket hang up

Before the crash this is what I see in docker ps

CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS              PORTS                    NAMES
30216d40636d        graykode/ai-docstring   "python3 app.py"    18 seconds ago      Up 17 seconds       0.0.0.0:5000->5000/tcp   hopeful_davinci
@graykode
Copy link
Owner

graykode commented Nov 24, 2020

@ivalmian

I know very well about this issue. This is when a container falls into OOM and is killed due to the docker container default memory limit on macOS(2GB).
As stated in the README, there are two ways to solve it. The first is to set the memory limit higher than 2GB in the advanced docker configuration, or the second is to run the server in google colab. Please refer to this section for details. https://github.com/graykode/ai-docstring#1-run-the-container-for-the-model-inference-server

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