runbios-sdk 0.5.0-dev.345 → 0.5.0-dev.347

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.d.ts CHANGED
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
36
36
  * SDK version. Sent as part of the User-Agent header.
37
37
  * Must match package.json "version" -- enforced by a contract test.
38
38
  */
39
- export declare const VERSION = "0.5.0-dev.345";
39
+ export declare const VERSION = "0.5.0-dev.347";
40
40
  export declare class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  readonly models: Models;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
36
36
  * SDK version. Sent as part of the User-Agent header.
37
37
  * Must match package.json "version" -- enforced by a contract test.
38
38
  */
39
- export const VERSION = '0.5.0-dev.345';
39
+ export const VERSION = '0.5.0-dev.347';
40
40
  export class RunBiOS {
41
41
  /** Search models, fetch configs, check adapter compatibility. */
42
42
  models;
@@ -598,6 +598,22 @@ export declare class Loop {
598
598
  * the base on every remaining sample, with no wait for new ones.
599
599
  */
600
600
  runPipeline(id: string): Promise<PipelineMutationResponse>;
601
+ /**
602
+ * The workspace's deployments serving exactly the live version's weights.
603
+ * For a live version whose deployment was deleted: deploy its weights again
604
+ * (`live.training_job_id`, `live.checkpoint_id`), then pick the deployment
605
+ * with {@link useLiveDeployment}. 409 `NO_LIVE_VERSION` when it has none.
606
+ */
607
+ liveDeployments(id: string): Promise<LiveDeploymentsResponse>;
608
+ /**
609
+ * Answer the pipeline's model name from this deployment of the live
610
+ * version's weights. Nothing is trained again; the deployment bills you by
611
+ * the hour, like any deployment. Refused while the pipeline's own
612
+ * deployment still exists (409 `LIVE_DEPLOYMENT_PRESENT`: start it again
613
+ * instead), for other weights (422 `DEPLOYMENT_WEIGHTS_DIFFER`) and for a
614
+ * deployment that is not running (409 `DEPLOYMENT_NOT_RUNNING`).
615
+ */
616
+ useLiveDeployment(id: string, deploymentId: string): Promise<UseLiveDeploymentResponse>;
601
617
  /**
602
618
  * {@link importRows}, with every row given the pipeline's own tag. `source`
603
619
  * defaults to that tag; the rows, the answer and the retry rules are the
@@ -851,3 +867,30 @@ export declare class Loop {
851
867
  */
852
868
  listBenchmarkRunItems(id: string, params?: BenchmarkRunItemListParams): Promise<BenchmarkRunItemsResponse>;
853
869
  }
870
+ /** What {@link Loop.liveDeployments} answers. */
871
+ export interface LiveDeploymentsResponse {
872
+ live: {
873
+ run_id: string;
874
+ version: number;
875
+ checkpoint_id: string;
876
+ training_job_id: string | null;
877
+ };
878
+ current_deployment_id: string | null;
879
+ deployments: Array<{
880
+ id: string;
881
+ name: string;
882
+ status: string;
883
+ }>;
884
+ }
885
+ /** What {@link Loop.useLiveDeployment} answers. */
886
+ export interface UseLiveDeploymentResponse {
887
+ live: {
888
+ run_id: string;
889
+ version: number;
890
+ checkpoint_id: string;
891
+ training_job_id: string | null;
892
+ };
893
+ deployment_id: string;
894
+ status: string;
895
+ serving_name: string;
896
+ }
@@ -954,6 +954,26 @@ export class Loop {
954
954
  async runPipeline(id) {
955
955
  return this._http.fetchPost(`/api/loop/pipelines/${encodeURIComponent(id)}/run`, {});
956
956
  }
957
+ /**
958
+ * The workspace's deployments serving exactly the live version's weights.
959
+ * For a live version whose deployment was deleted: deploy its weights again
960
+ * (`live.training_job_id`, `live.checkpoint_id`), then pick the deployment
961
+ * with {@link useLiveDeployment}. 409 `NO_LIVE_VERSION` when it has none.
962
+ */
963
+ async liveDeployments(id) {
964
+ return this._http.fetchGet(`/api/loop/pipelines/${encodeURIComponent(id)}/live/deployments`);
965
+ }
966
+ /**
967
+ * Answer the pipeline's model name from this deployment of the live
968
+ * version's weights. Nothing is trained again; the deployment bills you by
969
+ * the hour, like any deployment. Refused while the pipeline's own
970
+ * deployment still exists (409 `LIVE_DEPLOYMENT_PRESENT`: start it again
971
+ * instead), for other weights (422 `DEPLOYMENT_WEIGHTS_DIFFER`) and for a
972
+ * deployment that is not running (409 `DEPLOYMENT_NOT_RUNNING`).
973
+ */
974
+ async useLiveDeployment(id, deploymentId) {
975
+ return this._http.fetchPost(`/api/loop/pipelines/${encodeURIComponent(id)}/live/deployment`, { deployment_id: deploymentId });
976
+ }
957
977
  /**
958
978
  * {@link importRows}, with every row given the pipeline's own tag. `source`
959
979
  * defaults to that tag; the rows, the answer and the retry rules are the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runbios-sdk",
3
- "version": "0.5.0-dev.345",
3
+ "version": "0.5.0-dev.347",
4
4
  "description": "Official TypeScript SDK for the Run BiOS training and deployment platform API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",