Open MathildaSu opened 5 years ago
Since I don't have your data, I tested it with our toy data. I could not reproduce the bug you are reporting.
Here's the thing I tried:
import matchzoo as mz
pp = mz.preprocessors.DSSMPreprocessor()
dp = mz.datasets.toy.load_data()
pp.fit_transform(dp)
print(pp.context) # actually prints correctly fitted context
pp.fit(dp)
print(pp.context) # prints the same thing
Describe the bug
When calling
preprocessor = mz.preprocessors.DSSMPreprocessor() train_processed = preprocessor.fit_transform(train_pack)
the preprocessor does not automatically initialise preprocessor.context like when callingtrain_processed = preprocessor.fit(train_pack)
To Reproduce
Describe your attempts
Current workaround: Separately perform preprocessor.fit() and preprocessor.transform()
Context