Update python_ops.py
fix trace error when batchsize eq 1 and the model is clip model
test_modeling_clip.py has been added in the second commit. You can review and run it to reproduce !
thx,I will change this code.
发自我的iPhone
------------------ Original ------------------ From: Super Daniel @.> Date: Mon,Oct 31,2022 2:41 PM To: hpcaitech/ColossalAI @.> Cc: Bo tang @.>, Author @.> Subject: Re: [hpcaitech/ColossalAI] Update python_ops.py (PR #1770)
@super-dainiu commented on this pull request.
In tests/test_auto_parallel/test_tensor_shard/test_modeling_clip.py:
> +model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32") +model = model.to('meta') +processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
don't load pretrained weights, cuz for the CI testing it will spend a lot of time.
Can refer to these files.
https://github.com/hpcaitech/ColossalAI/tree/main/tests/test_fx/test_tracer/test_hf_model
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Does this PR still valid? Or the developer has gavin up?
Closed due to inactivity.