Skip to content

Commit c367d29

Browse files
committed
Update backend guide
1 parent d1997dd commit c367d29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contributing/BACKENDS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Refer to examples:
127127
##### 2.4.5. Create and register the backend config models
128128

129129
Under the backend directory, create the `models.py` file and define the backend config model classes there.
130-
Every backend must define two models:
130+
Every backend must define at least two models:
131131

132132
* `*BackendConfig` that contains all backend parameters available for user configuration except for creds.
133133
* `*BackendConfigWithCreds` that contains all backends parameters available for user configuration and also creds.
@@ -136,7 +136,7 @@ These models are used in server/config.yaml, the API, and for backend configurat
136136

137137
The models should be added to `AnyBackendConfig*` unions in [`src/dstack/_internal/core/backends/models.py`](https://github.com/dstackai/dstack/blob/master/src/dstack/_internal/core/backends/models.py).
138138

139-
It's not required but recommended to define `*BackendStoredConfig` that extends `*BackendConfig` to be able to store extra parameters in the DB. By the same logic, it's recommended to define `*Config` that extends `*BackendStoredConfig` with creds and use it as the main `Backend` and `Compute` config instead of using `*BackendConfigWithCreds` directly.
139+
It's not required but recommended to also define `*BackendStoredConfig` that extends `*BackendConfig` to be able to store extra parameters in the DB. By the same logic, it's recommended to define `*Config` that extends `*BackendStoredConfig` with creds and use it as the main `Backend` and `Compute` config instead of using `*BackendConfigWithCreds` directly.
140140

141141
Refer to examples:
142142
[datacrunch](https://github.com/dstackai/dstack/blob/master/src/dstack/_internal/core/backends/datacrunch/models.py),

0 commit comments

Comments
 (0)