FileFeatureStorage lowercases the instrument directory name when building feature paths
FileFeatureStorage lowercases the instrument directory name when building feature paths (instrument.lower()/field.lower().freq.bin). On case‑sensitive filesystems (e.g., Linux) where the vendor data is stored with uppercase instrument folders (data/xsto/features/ABB-U/...), the loader looks for abb-u/…, can’t find the file, and every expression resolves to an empty dataframe even though the data exists.
To Reproduce
Steps to reproduce the behavior:
Store local feature data under uppercase instrument directories (e.g., data/xsto/features/ABB-U/close.day.bin). Initialize qlib with that provider URI. Request any feature for that instrument, e.g. D.features(["ABB-U"], ["$close"], "2000-01-01", "2025-12-31"). The result is an empty dataframe and the feature storage backend reports the file is missing.
Expected Behavior
FileFeatureStorage should respect the actual on-disk casing instrument list (or probe common case variants) so that features load correctly regardless of filesystem case sensitivity.
Screenshot
N/A – the console logs show statements such as [FileFeatureStorage.getitem] uri=…/features/abb-u/close.day.bin missing for request=… even though …/features/ABB-U/close.day.bin exists.
Environment
Version: 0.9.7 Python version: 3.12 (virtual env) OS: Linux (Ubuntu on AMD cloud server, case-sensitive filesystem) Commit number: N/A (using pip wheel) Additional Notes We patched FileFeatureStorage locally to keep multiple filename candidates (instrument.lower(), original case, uppercase) and select the first existing path before reading. After this change ABB-U and other uppercase symbols load correctly. Happy to submit a PR if this approach sounds acceptable.
Hi, @maxilirator
Thanks for the detailed report! Qlib’s feature storage layer intentionally normalizes instrument names to lowercase to keep behavior consistent across platforms — especially Windows, which uses a case-insensitive filesystem.
Because of this convention, feature folders on disk are expected to be lowercase as well.If your vendor data is stored under uppercase directories (e.g. ABB-U), the recommended solution is to convert those folder names to lowercase so they match Qlib’s lookup logic.
Thanks again for sharing your findings!