From 9e486d83ce85db60833a0dc32b2423889e97c92e Mon Sep 17 00:00:00 2001 From: tharvik Date: Wed, 7 Feb 2024 10:41:19 +0100 Subject: [PATCH] discojs-core/specs: prefer local import --- discojs/discojs-core/src/aggregator/mean.spec.ts | 2 +- discojs/discojs-core/src/serialization/model.spec.ts | 2 +- discojs/discojs-core/src/serialization/weights.spec.ts | 2 +- discojs/discojs-core/src/validation/validator.spec.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discojs/discojs-core/src/aggregator/mean.spec.ts b/discojs/discojs-core/src/aggregator/mean.spec.ts index fe1e6179e..23d9f2a31 100644 --- a/discojs/discojs-core/src/aggregator/mean.spec.ts +++ b/discojs/discojs-core/src/aggregator/mean.spec.ts @@ -2,7 +2,7 @@ import { assert, expect } from 'chai' import { Map } from 'immutable' -import { aggregator, defaultTasks, client, Task, tf } from '@epfml/discojs-node' +import { aggregator, defaultTasks, client, Task, tf } from '..' import { AggregationStep } from './base' const task = defaultTasks.titanic.getTask() diff --git a/discojs/discojs-core/src/serialization/model.spec.ts b/discojs/discojs-core/src/serialization/model.spec.ts index 147655edf..b544501d5 100644 --- a/discojs/discojs-core/src/serialization/model.spec.ts +++ b/discojs/discojs-core/src/serialization/model.spec.ts @@ -1,6 +1,6 @@ import { assert } from 'chai' -import { tf, serialization } from '@epfml/discojs-node' +import { tf, serialization } from '..' async function getRawWeights (model: tf.LayersModel): Promise> { return Array.from( diff --git a/discojs/discojs-core/src/serialization/weights.spec.ts b/discojs/discojs-core/src/serialization/weights.spec.ts index eb2fdb7af..2a4a10b18 100644 --- a/discojs/discojs-core/src/serialization/weights.spec.ts +++ b/discojs/discojs-core/src/serialization/weights.spec.ts @@ -1,6 +1,6 @@ import { assert } from 'chai' -import { WeightsContainer, serialization } from '@epfml/discojs-node' +import { WeightsContainer, serialization } from '..' describe('weights', () => { it('can encode what it decodes', async () => { diff --git a/discojs/discojs-core/src/validation/validator.spec.ts b/discojs/discojs-core/src/validation/validator.spec.ts index 2b3cc76d9..3d9e2bb5a 100644 --- a/discojs/discojs-core/src/validation/validator.spec.ts +++ b/discojs/discojs-core/src/validation/validator.spec.ts @@ -32,7 +32,7 @@ describe('validator', () => { .map((file: string) => dir + subdir + file)) const labels = files.flatMap((files, index) => Array(files.length).fill(index)) - const data: data.Data = (await new node.data.NodeImageLoader(simplefaceMock) + const data = (await new node.data.NodeImageLoader(simplefaceMock) .loadAll(files.flat(), { labels })).train const meanAggregator = new aggregator.MeanAggregator(simplefaceMock) const client = new clients.Local(new URL('http://localhost:8080'), simplefaceMock, meanAggregator)