Torch Object Storage
Feature | s3fs | tosfsspec | Remarks |
Underlying dependencies | boto3/botocore | tosnativeclient (a high-performance kernel). | tosfsspec uses a proprietary high-performance kernel, instead of the boto ecosystem. |
Asynchronous support | Supported (via aiobotocore). | Not supported. | All tosfsspec operations are currently synchronous and blocking. They cannot be awaited in an asyncio event loop. |
Credentials configuration | Supports multiple methods, such as through environment variables, a configuration file (~/.aws/), Identity and Access Management (IAM) roles, and explicit passing. | Primarily relies on the explicit passing of key, secret and region. | To keep configuration explicit within the fsspec framework, we recommend explicitly passing credentials during tosfsspec initialization rather than relying on global configuration. |
Caching strategies | Supports multiple cache_type options, such as readahead, blockcache, and simplecache. | cache_type is fixed at none. | tosfsspec does not use the default caching layer provided by fsspec. Instead, it relies on the caching system built into the high-performance kernel. |
Object versioning | Supported (via version_aware=True). | Not supported. | tosfsspec cannot handle all versions of an object. All operations work on the most recent version. |
Requester Pays | Supported (via requester_pays=True). | Not supported. | tosfsspec currently does not support the Requester Pays feature. |
Server-side encryption | Supported (via s3_additional_kwargs). | Partially supported (via storage_class and others). | TOS handles encryption settings differently from S3. tosfsspec manages server-side encryption indirectly via the storage_class parameter, lacking a direct passthrough option like s3_additional_kwargs in s3fs. |
Fork safety in multiprocessing | Requires manual configuration. Users must set the start method to spawn or forkserver. Otherwise, it is unsafe. | Automatically reinitializes the client in child processes with the built-in fork safety mechanism. | Using tosfsspec with the fork method is a more robust option. However, we recommend using the spawn method to reduce potential issues. |
Hierarchical namespace | Not supported (S3 uses a flat namespace). | Explicitly supports and distinguishes between HNS and FNS buckets (e.g., maxdepth restrictions). | tosfsspec provides adaptations for the two distinct TOS bucket types. |