eugeneyan / eugeneyan-comments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https://eugeneyan.com/writing/design-patterns/

utterances-bot opened this issue · comments

Design Patterns in Machine Learning Code and Systems

Understanding and spotting patterns to use code and components as intended.

https://eugeneyan.com/writing/design-patterns/

Great article! Is "src" a python package?

Yes, but in the sense that its something you can pip install. It's just a directory where I put my code. You can find an example here.

Thank you, Eugene! Great read.

For the adapter pattern, I'm not quite understanding the definition, "the adapter pattern increases compatibility between interfaces".

In your pandas example, attempting to apply your definition, each read_* is a unique interface that generates a common object, a dataframe. Are you saying that the dataframe and the read_* are two interfaces?

Your work is really appreciated.

Nice info Eugene.
Here are few observations:

  1. Traditional Factory pattern is not much applicable to Python and examples like hugging face achieving through composition is recommended.
  2. Decorator pattern is different from decorators in python. Both are not exactly same. Please verify my observation.