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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run works in the LightningList structure on cloud #14645

Open
krshrimali opened this issue Sep 11, 2022 · 1 comment
Open

Unable to run works in the LightningList structure on cloud #14645

krshrimali opened this issue Sep 11, 2022 · 1 comment
Assignees
Labels
app:cloud app Generic label for Lightning App package bug Something isn't working
Milestone

Comments

@krshrimali
Copy link
Contributor

krshrimali commented Sep 11, 2022

馃悰 Bug

(as reported by @aniketmaurya)

Following error is raised:

[flow] 2022-09-11T08:14:06.981Z INFO: Traceback (most recent call last):
[flow] 2022-09-11T08:14:06.981Z   File "/content/venv/lib/python3.8/site-packages/lightning_launcher/launcher.py", line 206, in run_lightning_flow
[flow] 2022-09-11T08:14:06.981Z     app._run()
[flow] 2022-09-11T08:14:06.981Z   File "/content/venv/lib/python3.8/site-packages/lightning_app/core/app.py", line 427, in _run
[flow] 2022-09-11T08:14:06.981Z     done = self.run_once()
[flow] 2022-09-11T08:14:06.981Z   File "/content/venv/lib/python3.8/site-packages/lightning_app/core/app.py", line 376, in run_once
[flow] 2022-09-11T08:14:06.981Z     self.root.run()
[flow] 2022-09-11T08:14:06.981Z   File "app.py", line 41, in run
[flow] 2022-09-11T08:14:06.981Z     model_serve.run()
[flow] 2022-09-11T08:14:06.981Z   File "/content/venv/lib/python3.8/site-packages/lightning_app/runners/backends/backend.py", line 59, in _dynamic_run_wrapper
[flow] 2022-09-11T08:14:06.981Z     self.create_work(app, work)
[flow] 2022-09-11T08:14:06.981Z   File "/content/venv/lib/python3.8/site-packages/lightning_launcher/lightning_backend.py", line 147, in create_work
[flow] 2022-09-11T08:14:06.981Z     app.work_queues[work.name].put(work)
[flow] 2022-09-11T08:14:06.981Z   File "/content/venv/lib/python3.8/site-packages/lightning_app/core/queues.py", line 224, in put
[flow] 2022-09-11T08:14:06.981Z     value = pickle.dumps(item)
[flow] 2022-09-11T08:14:06.981Z TypeError: cannot pickle '_thread.RLock' object

To Reproduce

import lightning as L
from lightning_app.structures import List

class CounterWork(L.LightningWork):
    def __init__(self):
        super().__init__()
        self.counter = 0
    def run(self):
        self.counter += 1
        print(self.counter)

class RootFlow(L.LightningFlow):
    def __init__(self):
        super().__init__()
        self.list = List(*[CounterWork(), CounterWork()])
        self.work = CounterWork()
    def run(self):
        for work in self.list:
            work.run()

app = L.LightningApp(RootFlow())

Expected behavior

Should work.

Environment

lightning, version 0.5.7

Additional context

cc: @tchaton @ethanwharris

cc @tchaton @rohitgr7

@krshrimali krshrimali added needs triage Waiting to be triaged by maintainers app Generic label for Lightning App package app:cloud bug Something isn't working and removed needs triage Waiting to be triaged by maintainers labels Sep 11, 2022
@tchaton tchaton self-assigned this Sep 12, 2022
@tchaton tchaton added the priority: 0 High priority task label Sep 12, 2022
@Borda
Copy link
Member

Borda commented Sep 14, 2022

@tchaton, any update so far? 馃惏

@Borda Borda added this to the v1.8.x milestone Oct 31, 2022
@Borda Borda modified the milestones: v1.8.x, v1.9 Jan 6, 2023
@Borda Borda modified the milestones: v1.9, v1.9.x Jan 16, 2023
@awaelchli awaelchli removed the priority: 0 High priority task label Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:cloud app Generic label for Lightning App package bug Something isn't working
Projects
No open projects
Status: No status
Development

No branches or pull requests

4 participants