spaCy
spaCy copied to clipboard
Base Config Setup filepath issue
How to reproduce the behaviour
When initializing my configuration file, I set my train
and dev
paths as follows in my base_config.cfg:
train = 'data/train.spacy'
dev = 'data/valid.spacy'
After running python -m spacy init fill-config ./base_config.cfg ./config.cfg
, the single quotes wrapping each file path result in the following
train = "'data/train.spacy'"
dev = "'data/valid.spacy'"
I'm wondering if there should be a fix to accept single quotes as a string wrappers instead of assume it is part of the literal path.
Your Environment
- Operating System: Mac
- Python Version Used: 3.9
- spaCy Version Used: 3.1.3
- Environment Information:
I think the issue is that the values are parsed as JSON and JSON only supports double quotes. See: https://thinc.ai/docs/usage-config.
So I don't think we want to try to modify this behavior, but we can definitely think about how to document it more clearly.
It's been a long time since this issue was raised, but thanks for bringing it up - I just added a check to confection in that should warn in cases like this in the future.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.