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

Several Improvements for the latest PyTorch Framework #1564

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MGAMZ
Copy link

@MGAMZ MGAMZ commented Jul 21, 2024

Motivation

Fix torch Future Warning:
FutureWarning: torch.cuda.amp.GradScaler(args...) is deprecated. Please use torch.amp.GradScaler('cuda', args...) instead.

Modification

Deprecate torch.cuda.amp and transfer to torch.amp, and partial it with device='cuda'. The modification will not introduce any influence on the following codes in this file

FutureWarning: `torch.cuda.amp.GradScaler(args...)` is deprecated. Please use `torch.amp.GradScaler('cuda', args...)` instead.
FutureWarning: `torch.cuda.amp.GradScaler(args...)` is deprecated. Please use `torch.amp.GradScaler('cuda', args...)` instead.
@CLAassistant
Copy link

CLAassistant commented Jul 21, 2024

CLA assistant check
All committers have signed the CLA.

@MGAMZ
Copy link
Author

MGAMZ commented Jul 26, 2024

Motivation

When using torch.compile, the 'disable' key compile could override the compile. When disable is set to True, there should be no prompt like 'The model has been compiled'.

Modification

Add a simple check when compile is a dict, and check if there exists a key 'disable'.

FSDP.optim_state_dict_to_load requires the following parameters:

model: Module,
optim: Optimizer,
optim_state_dict: Dict[str, Any]
@MGAMZ MGAMZ changed the title Fix Torch Future Warning on the deprecation of 'torch.cuda.amp' Several Improvement for the latest PyTorch Framework Aug 21, 2024
@MGAMZ MGAMZ changed the title Several Improvement for the latest PyTorch Framework Several Improvements for the latest PyTorch Framework Aug 21, 2024
…tions

The current runner implementation has not yet supported for pure-python style configurations on model wrapper class. I follow the mainstream implementation to support this feature.
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

Successfully merging this pull request may close these issues.

2 participants