(
modelJSON: ModelJSON,
loadWeights: (weightsManifest: WeightsManifestConfig) => Promise<[
/* weightSpecs */ WeightsManifestEntry[], WeightData,
]>)
| 580 | * @returns A Promise of the `ModelArtifacts`, as described by the JSON file. |
| 581 | */ |
| 582 | export async function getModelArtifactsForJSON( |
| 583 | modelJSON: ModelJSON, |
| 584 | loadWeights: (weightsManifest: WeightsManifestConfig) => Promise<[ |
| 585 | /* weightSpecs */ WeightsManifestEntry[], WeightData, |
| 586 | ]>): Promise<ModelArtifacts> { |
| 587 | let weightSpecs: WeightsManifestEntry[] | undefined; |
| 588 | let weightData: WeightData | undefined; |
| 589 | |
| 590 | if (modelJSON.weightsManifest != null) { |
| 591 | [weightSpecs, weightData] = await loadWeights(modelJSON.weightsManifest); |
| 592 | } |
| 593 | |
| 594 | return getModelArtifactsForJSONSync(modelJSON, weightSpecs, weightData); |
| 595 | } |
| 596 | |
| 597 | /** |
| 598 | * Populate ModelArtifactsInfo fields for a model with JSON topology. |
no test coverage detected
searching dependent graphs…