Adapter Libraries#
Experimental
The adapter libraries (nv-dfm-lib-common and nv-dfm-lib-weather) are experimental.
They are provided as examples and starting points for building your own adapters.
Before any production use, review and extensively test all adapters in your target environment.
In addition to the core nv-dfm-core package, DFM ships optional adapter library packages that provide reusable schemas and ready-made adapters for common data processing tasks. These libraries are intended to accelerate development by offering working examples that can be used directly or adapted to your needs.
Package Overview#
Package |
Purpose |
Install |
|---|---|---|
|
Shared schemas and validation utilities used across adapter libraries |
|
|
Weather and climate data adapters (data loaders, processing, AI models) |
|
Both packages depend on nv-dfm-core. The weather library also depends on nv-dfm-lib-common for shared output schemas.
nv-dfm-core (core framework, no lib dependencies)
└── nv-dfm-lib-common (shared schemas: XArraySchema, GeoJsonFile, TextureFile)
└── nv-dfm-lib-weather (weather adapters, data loaders, AI models)
Using Library Adapters in Your Federation#
To use an adapter from a library package in your federation:
Install the library alongside
nv-dfm-core.Reference the adapter in your site’s interface section of
.dfm.yaml, mapping the operation to the adapter class.Run code generation (
dfm gen) to produce the operations API.
See Adapters & Operations for the full details on how adapters are bound to operations and exposed to pipeline users, and Federation Configuration for .dfm.yaml syntax.
Writing Your Own Adapter Library#
The nv-dfm-lib-* packages in this repository serve as examples. In practice, you should build your own adapters and federations in separate repositories, using these packages as reference for structure and conventions. A new adapter library should:
Live in its own repository alongside your federation configuration.
Depend on
nv-dfm-coreand optionallynv-dfm-lib-commonfor shared schemas.Include YAML config files declaring each adapter’s operation signature.
Include tests — see
tests/unit/nv_dfm_lib_weather/in this repository for examples of adapter unit tests.