Parser output affected by Python version? #10415
-
I've noticed that the behaviour of the dependency parser is affected by the version of Python that you run it under, even when you load the same language model. For instance: "The last train to Dallas leaves at 6 o'clock." labels the "leaves" as a verb (VBZ) when run under Python 3.7.7, but as a noun (NNS) when run under Python 3.8.0. I'm loading the "en_core_web_lg" corpus every time. Is this expected behaviour? Is there something I can do to keep the behaviour that 3.7.7. exhibited (because it seems to me that it's usually the correct alternative)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
We can't guarantee exactly the same results between Python versions because a lot of internal implementation details in Python can change, unfortunately. Because the difference are not due to anything in our code, there's also not really a way to specify behavior matching one particular Python version. While you might see a lot of different individual predictions, it would be weird if there were significant changes in accuracy between Python versions. Have you been able to measure a difference in the quality of predictions between Python versions? |
Beta Was this translation helpful? Give feedback.
-
I think it is unexpected to get different results on inference where the only difference is the python version. For training, there will be cross-platform and CPU vs. GPU differences in the exact results due to float rounding, etc., but I wouldn't have expected this on inference. I also couldn't immediately replicate this with python 3.7 vs. 3.8, My first guess is that you're comparing |
Beta Was this translation helpful? Give feedback.
I think it is unexpected to get different results on inference where the only difference is the python version. For training, there will be cross-platform and CPU vs. GPU differences in the exact results due to float rounding, etc., but I wouldn't have expected this on inference.
I also couldn't immediately replicate this with python 3.7 vs. 3.8,
spacy
v3.2.0 anden_core_web_lg
v3.2.0 in linux. So that we can look into the details, could you providespacy info --markdown
for both environments and also the exact versions ofnumpy
,blis
, andthinc
?My first guess is that you're comparing
en_core_web_lg
v3.1.0 toen_core_web_lg
v3.2.0. The provided pipelines are retrained from scratch for ea…