trainfabric 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7701,6 +7701,7 @@ var runDefaultsUpdateSchema = external_exports.object({
|
|
|
7701
7701
|
var runtimeDependencySchema = external_exports.object({
|
|
7702
7702
|
name: external_exports.string().min(1),
|
|
7703
7703
|
version: external_exports.string().min(1).optional(),
|
|
7704
|
+
constraint: external_exports.string().min(1).optional(),
|
|
7704
7705
|
source: external_exports.enum(["training_yaml", "pyproject", "requirements", "environment_yml", "dockerfile"]),
|
|
7705
7706
|
required: external_exports.boolean()
|
|
7706
7707
|
});
|
|
@@ -8209,6 +8210,9 @@ var DatasetsClient = class extends ResourceClient {
|
|
|
8209
8210
|
const effectiveProjectId = projectId ?? this.parent.projectId;
|
|
8210
8211
|
return this.requestGet(`/v1/datasets${effectiveProjectId ? `?projectId=${effectiveProjectId}` : ""}`);
|
|
8211
8212
|
}
|
|
8213
|
+
delete(datasetId) {
|
|
8214
|
+
return this.requestDelete(`/v1/datasets/${datasetId}`);
|
|
8215
|
+
}
|
|
8212
8216
|
};
|
|
8213
8217
|
|
|
8214
8218
|
// ../sdk/dist/client/deployments.js
|
|
@@ -8941,7 +8945,7 @@ function buildComputeSpec(options) {
|
|
|
8941
8945
|
|
|
8942
8946
|
// src/index.ts
|
|
8943
8947
|
var DEFAULT_TRAINFABRIC_API_URL2 = "https://api.trainfabric.com";
|
|
8944
|
-
var CLI_VERSION = "0.1.
|
|
8948
|
+
var CLI_VERSION = "0.1.20";
|
|
8945
8949
|
var CONFIG_DIR = import_node_path3.default.join(import_node_os2.default.homedir(), ".trainfabric");
|
|
8946
8950
|
var CONFIG_PATH = import_node_path3.default.join(CONFIG_DIR, "config.json");
|
|
8947
8951
|
var FALLBACK_SECRET_PATH = import_node_path3.default.join(CONFIG_DIR, "session.enc");
|
|
@@ -9510,6 +9514,10 @@ program2.command("datasets:list").option("--project <projectId>").description("L
|
|
|
9510
9514
|
program2.command("datasets:get").argument("<datasetId>").description("Fetch dataset detail").action(async (datasetId) => {
|
|
9511
9515
|
printJson(await createClient(loadConfig()).datasets.get(String(datasetId)));
|
|
9512
9516
|
});
|
|
9517
|
+
program2.command("datasets:delete").argument("<datasetId>").description("Delete a dataset").action(async (datasetId) => {
|
|
9518
|
+
await createClient(loadConfig()).datasets.delete(String(datasetId));
|
|
9519
|
+
printJson({ deleted: true, id: String(datasetId) });
|
|
9520
|
+
});
|
|
9513
9521
|
program2.command("datasets:upload").argument("<file>").option("--project <projectId>").option("--name <name>").description("Upload a dataset through upload sessions").action(async (file, options) => {
|
|
9514
9522
|
const config = loadConfig();
|
|
9515
9523
|
const dataset = await createClient(config).datasets.create({
|