You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why these changes are being introduced:
Formerly, a transformer strategy class was instantiated in a per-record fashion,
where things like the timdex_record_id and other record-level values were passed.
This ultimately felt awkward, when we could just as easily instantiate it once in
a more generic fashion, then build EmbeddingInput instances with the *result* of
the strategy extracting text from the TIMDEX JSON record.
How this addresses that need:
All record-level details are removed as arguments for initializing a transformer
strategy. Instead, the helper function create_embedding_inputs() is responsible
for passing the TIMDEX JSON record to the transformer strategies, and then
building an EmbeddingInput object before yielding. This keeps the init of those
strategies much simpler, and preventing properties in the class they don't really
need.
Side effects of this change:
* None
Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/USE-131
* https://mitlibraries.atlassian.net/browse/USE-132
0 commit comments