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

run_modal.py (application protocol failed to receive SSL data) #162

Open
Dragoy opened this issue Sep 9, 2024 · 2 comments
Open

run_modal.py (application protocol failed to receive SSL data) #162

Dragoy opened this issue Sep 9, 2024 · 2 comments

Comments

@Dragoy
Copy link

Dragoy commented Sep 9, 2024

This is for bugs only

Did you already ask in the discord?

Yes

You verified that this is a bug and not a feature request or question by asking in the discord?

Yes

Describe the bug

The modal version doesn't work:
modal run run_modal.py --config-file-list-str=/root/ai-toolkit/config/modal_train_lora_flux_24gb.yaml

I run it with this command and after a while I get an error:

application protocol failed to receive SSL data
protocol: <asyncio.sslproto.SSLProtocol object at 0x0000024DF7041FF0>
transport: <_SelectorSocketTransport fd=185608 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "C:\Users\Dragoy\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 551, in data_received
    self._app_protocol.data_received(chunk)
  File "D:\Program Files\Stable Diffusion\FLUX_TRAIN\modal_com\ai-toolkit\venv\lib\site-packages\grpclib\protocol.py",
line 714, in data_received
    events = self.connection.feed(data)
  File "D:\Program Files\Stable Diffusion\FLUX_TRAIN\modal_com\ai-toolkit\venv\lib\site-packages\grpclib\protocol.py",
line 189, in feed
    return self._connection.receive_data(data)  # type: ignore
  File "D:\Program Files\Stable Diffusion\FLUX_TRAIN\modal_com\ai-toolkit\venv\lib\site-packages\h2\connection.py", line
1463, in receive_data
    events.extend(self._receive_frame(frame))
  File "D:\Program Files\Stable Diffusion\FLUX_TRAIN\modal_com\ai-toolkit\venv\lib\site-packages\h2\connection.py", line
1487, in _receive_frame
    frames, events = self._frame_dispatch_table[frame.__class__](frame)
AttributeError: 'H2Connection' object has no attribute '_frame_dispatch_table'

#158 - the patch also doesn't help....

@Dragoy
Copy link
Author

Dragoy commented Sep 9, 2024

@jaretburkett

@tazztone
Copy link

tazztone commented Oct 8, 2024

aight this fixed it for me:
edit: the run_modal.py file to exclude the venv and pycache folders like this:

code_mount = modal.Mount.from_local_dir(
    "D:\\Program Files\Stable Diffusion\\FLUX_TRAIN\\modal_com\\ai-toolkit", 
    remote_path="/root/ai-toolkit",
    condition=lambda path: not any(segment in ['venv', '__pycache__'] for segment in path.split(os.sep))
)

source for solution:
https://modallabscommunity.slack.com/archives/C06GPR10K9V/p1727882458380109?thread_ts=1725407469.736319&cid=C06GPR10K9V

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