ArneBinder / pytorch-ie

PyTorch-IE: State-of-the-art Information Extraction in PyTorch
MIT License
75 stars 7 forks source link

Evaluate Class Resolver as an alternative to passing objects to model and taskmodule constructors. #60

Open ChristophAlt opened 2 years ago

ChristophAlt commented 2 years ago

See: https://github.com/cthoyt/class-resolver

ArneBinder commented 2 years ago

Looks Interesting!

Posting just for reference, might be related (in combination with hydra.utils.instantiate): Hydra Structured Configs

ChristophAlt commented 2 years ago

I think you should be able to use structured configs with this approach as well. The current problem is if we pass objects to models and taskmodules:

ArneBinder commented 2 years ago

I totally agree with the first two points, but regarding the third: hydra makes it quite easy to overwrite any subcomponent via command line or passing any overwrite config parameters to instantiate which looks like a very good fit for hyperparameter tuning in my opinion.