-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[App] Fix bug when using structures with works #15911
Changes from all commits
1b6975d
8d66550
86aa9b1
e68a212
1541932
dc91a96
16f4983
d8c0fb1
74e6700
c38d91e
d0eaf93
4e8a0c5
d6a9bdc
62bffe5
52c3e14
5d871b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# NOTE: the upper bound for the package version is only set for CI stability, and it is dropped while installing this package | ||
# in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment | ||
|
||
torchvision>=0.10.*, <=0.13.0 | ||
torchvision>=0.10.0, <=0.13.0 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# NOTE: the upper bound for the package version is only set for CI stability, and it is dropped while installing this package | ||
# in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment | ||
|
||
torchvision>=0.11.*, <=0.14.0 | ||
torchvision>=0.11.1, <=0.14.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is TV 0.11.1 compatible with PT 1.10.0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, 0.11.0 was yanked, 0.11.1 is recommended for PT 1.10.0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
gym[classic_control]>=0.17.0, <0.26.3 | ||
ipython[all] <8.6.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import typing as t | ||
|
||
from pyparsing import Optional | ||
|
||
from lightning_app.utilities.app_helpers import _LightningAppRef, _set_child_name | ||
|
||
T = t.TypeVar("T") | ||
|
@@ -52,23 +50,21 @@ def __init__(self, *items: T): | |
|
||
self._name: t.Optional[str] = "" | ||
self._last_index = 0 | ||
self._backend: Optional[Backend] = None | ||
self._backend: t.Optional[Backend] = None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why import with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because we already have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no I see the weird typing hack :D |
||
for item in items: | ||
self.append(item) | ||
_set_child_name(self, item, str(self._last_index)) | ||
self._last_index += 1 | ||
|
||
def append(self, v): | ||
from lightning_app import LightningFlow, LightningWork | ||
|
||
_set_child_name(self, v, str(self._last_index)) | ||
if self._backend: | ||
if isinstance(v, LightningFlow): | ||
LightningFlow._attach_backend(v, self._backend) | ||
_set_child_name(self, v, str(self._last_index)) | ||
elif isinstance(v, LightningWork): | ||
self._backend._wrap_run_method(_LightningAppRef().get_current(), v) | ||
v._name = f"{self.name}.{self._last_index}" | ||
self._last_index += 1 | ||
v._name = f"{self.name}.{self._last_index}" | ||
self._last_index += 1 | ||
super().append(v) | ||
|
||
@property | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shall be TV 0.11 as to be paired with PT 1.10, right?