-
Notifications
You must be signed in to change notification settings - Fork 19
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
Torch and Lightning 2.0.0 #60
Comments
@Adamits I have assigned this to you since you wanna take a stab. There is a new interface for CLI stuff (probably an imporvement over the somewhat ad hoc one they gave us): https://lightning.ai/docs/pytorch/stable/cli/lightning_cli.html Looks like an improvement, but some work to make things conformant. |
I have read these docs and have the basic lay of the land now. The migration should go in two steps:
|
Sounds good, I think I understand. Though I feel a bit annoyed that we have to use |
I'm working on the data module part of things in the next few days---haven't thought about the model side yet. FWIW, what LightningCLI is is basically a tool that can introspect to populate the argparse parser...which should help us enormously with the kind of bug we saw with not passing around the label smoothing... |
@Adamits believes it is possible to migrate to Torch 2 while staying on the 1.13 branch of PTL. The ability to complete this migration in two steps (one to Torch 2, then later migrating to PTL 2 focusing on CLI changes) would make this much easier. |
See CUNY-CL#60 for context, though we are not yet done with it since we are not migrating to PyTorch-Lightning 2.
Draft of the migration to PyTorch 2 in #173. Testing now---focusing on the transformer since we can use the causal mask flag there, hopefully. |
I have been using LightningCLI in another project and I have to say, it's a total vibe shift and it's way better than having big Bash scripts (without any nice syntax support), so I think we should prioritize this now. |
At some earlier point we were stuck on PyTorch <2, and there was no support for Python 3.10 or later. CUNY-CL#173 freed us from this restriction, but left in the restriction to PyTorch-Lightning <2. However, we were pinned on Python <= 3.10 by PyTorch, not PyTorch-Lightning, so we can now add support for additional Pythons. Python 3.12 is the actively developed branch; Python 3.8-3.11 are are on long-term (i.e., security-fix) support; Python 3.8 is just about to go out of date and Python 3.13 is approaching prerelease: https://devguide.python.org/versions/. So this adds support for all supported Python versions (except 3.8, which was already old when we started this project and which we never supported in the first place). This is closely related to, but does not close, CUNY-CL#60.
Another feature of this migration is that at least some if not all the models will work on M1/M2 Macs using their MPS accelerators. |
Closes CUNY-CL#60. Closes CUNY-CL#218. LightningCLI removes our need to create separate training and prediction CLI programs, moving nearly all of that logic into the base model. This commit in particular sets the stage: * Updates dependencies. * Increments minor version number. * Creates an empty `cli.py` where the CLI-speific logic will live.
The library does not work with Lightning (and one suspects that Torch itself is also an issue) > 2.0.0. The first issue I encounter when running
yoyodyne-train
with no arguments is related to a change in how Lightning command-line arguments are handled---I suspect there are at least a few more.So that the library is not broken at head---which I consider unacceptable---I have pinned as follows:
What we need to do is just to migrate to 2.0.0, by fixing Lightning (and Torch, if any) bugs until things work, and then re-pin these two dependencies
>=2.0.0
. I have initially assigned myself, but I would welcome help.The text was updated successfully, but these errors were encountered: