Code Monkey home page Code Monkey logo

fsspec-chfs's Introduction

fsspec-chfs

fsspec-chfs is a file system interface to CHFS. CHFS is a parallel consistent hashing file system created instantly using node-local storages such as persistent memory and NVMe SSD for high performance computing. This repository includes the integration for Dask.

Requirements

Getting Started

Installation

$ pip install fsspec-chfs

Create file system

You can create CHFS by chfsctl and set CHFS_SERVER environmental variable.

$ eval `chfsctl start`
$ chlist # show started servers

How to use fsspec-chfs

import fsspec

fs = fsspec.filesystem('chfs')

with fs.open('/hello') as f:
	f.write(b'world')

Use in Dask

fsspec-chfs provides CHFSClientDaemon plugin for Dask worker, and it optimizes CHFS initialization/termination in Dask.

client = Client(LocalCluster())
plugin = CHFSClientDaemon()
client.register_worker_plugin(plugin)
def func(path, data):
	fs = fsspec.filesystem("chfs_stub")
	fs.pipe(path, data)
	return 0
future = client.submit(func, "/tmp/foo", b'abcde')
counts = future.result()

Developing

VSCode devcontainer

You can use VSCode devcontainer to develop fsspec-chfs. The setup steps are follows:

  1. Install Docker and Remote-Container extension.
  2. Press Ctrl+Shift+P in VSCode.
  3. select Remote-Container: Open the folder in the Container

Testing

$ eval `chfsctl start` # start the server and set CHFS_SERVER
$ tox

fsspec-chfs's People

Contributors

donkomura avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.