aws / amazon-sagemaker-feedback

Amazon SageMaker Public Feedback Dashboard
Creative Commons Attribution Share Alike 4.0 International
6 stars 1 forks source link

JupyterLab notebook crashes consitently when using huggingface's transformers #138

Open Raffinate opened 1 month ago

Raffinate commented 1 month ago

Product Version

Issue Description

Sagemaker notebooks always crash and restart when using transformers processors regarless of memory machine spec.

Tried following machine specs:

Python Kernel: Python3 ipykernel

Minimum example I was able to reproduce the issues 100% of the time.

from transformers import CLIPProcessor

processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32") # or literally any other string

"DONE"
Screenshot 2024-10-08 at 22 23 45

Expected Behavior

  1. Create empty notebook and launch any machine
  2. Create following cell
    
    from transformers import CLIPProcessor

processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32") # or any literally any other string

print("DONE")

3. Run the code

Expected: cell to succeed and "DONE" is printed

### Observed Behavior

1. Create empty notebook and launch any machine
2. Create following cell

from transformers import CLIPProcessor

processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32") # or any literally any other string

print("DONE")


3. Run the code

Observed: Kerner Restarted

### Product Category

JupyterLab

### Feedback Category

Reliability and Stability

### Other Details

_No response_
ComputerVisionFans commented 4 weeks ago

same problem appeals here, when loading model from transformer using SageMaker Studio Classic , those kernel and notebook wont have any problem, but using this new sagemaker studio loading model from transformers from Huggingface. the kernel often died automatically, no matter how many Storage (GB) you set, or what instance you set, sometime i saw the instance cpu only used 10%...no sure what leads to notebook often cash...