What are the advantages of using torch.fx vs hooks for feature extractors?

I saw:


I am using hooks to get features for CCA comparison on NNs (GitHub - brando90/ultimate-anatome: Ἀνατομή is a PyTorch library to analyze representation of neural networks). Is there an advantage of moving to migrating to torch.fx? if yes what are they?

Thanks in advance!