GCNFrame
GCNFrame copied to clipboard
fix: macOS biodata encoding compatibility
Related issue: https://github.com/deepomicslab/GCNFrame/issues/11#issue-2884724673
Cross-platform encoding compatibility fix
Problem
The current encoding implementation using multiprocessing.Pool fails on macOS due to its different process forking behavior. This affects users trying to run the encoding function on macOS systems.
Solution
Implemented OS-specific parallel processing:
- Uses
ThreadPoolExecutorfor macOS environments - Retains
multiprocessing.Poolfor other operating systems (Linux/Windows)
Technical Details
- macOS handles process forking differently ("copy-on-write"), causing issues with
multiprocessing.Pool -
ThreadPoolExecutorprovides a more reliable parallel processing solution for macOS - Added OS detection using
platform.system()to automatically choose the appropriate method
Result after fix: