Jason Chou
Jason Chou
I also just put out a PR yesterday to fix this: https://github.com/mlfoundations/open_clip/pull/595 > if I try to load model without HF, this error encountered: > > ```python > import open_clip...
I got the same error trying to run both `--grad-checkpointing` and `--torchcompile`, but since pytorch 2.1.0 `--torchcompile` now works with `--accum-freq` > 1 as the next best option.
@rwightman No I haven't tried that. In that regard, the good news is that https://github.com/mlfoundations/open_clip/blob/91923dfc376afb9d44577a0c9bd0930389349438/src/open_clip/transformer.py#L320-L322 https://github.com/pytorch/pytorch/issues/79887 is [now fixed and we should be able](https://pytorch.org/docs/stable/checkpoint.html#torch.utils.checkpoint.checkpoint) to do e.g. ```python if self.grad_checkpointing...
@rwightman OK so it turned out that `use_reentrant=False` doesn't help. It still breaks at the same point: ``` [2023-11-08 12:56:29,383] [0/0] torch._utils_internal: [INFO] CompilationMetrics(frame_key='1', co_name='forward', co_filename='/home/jason-chou/.local/lib/python3.10/site-packages/open_clip/model.py', co_firstlineno=256, cache_size=0, guard_count=None, graph_op_count=None,...
There is another repeated label: "missile". According to [huggingface](https://huggingface.co/datasets/imagenet-1k) the 2nd one has been changed to "projectile, missile".
The issue with [`torch.cpu.amp.autocast`](https://pytorch.org/docs/stable/amp.html#torch.cpu.amp.autocast) is probably the same as https://github.com/pytorch/pytorch/issues/107663
Hmm, I don't know who is best suited to review this PR or who else is interested in running open_clip on M1/M2 Macs for that matter 🤔 @gabrielilharco Could you...
@gabrielilharco Do you know if any of the owners do? If not, can I get an external M1/M2 Mac user to endorse instead?
> If autocast is used with mps it should crash instead of falling back (in my opinion), so that it's more clear it doesn't work. @rwightman Falling back is the...
I am working on it (https://github.com/mlfoundations/open_clip/pull/654) but it may take a bit more time to merge. It might not help that much on M1 though...