From f0ed478b36431e25edb66f00f83083e11575ea8f Mon Sep 17 00:00:00 2001 From: IDONTSUDO Date: Fri, 26 Apr 2024 15:51:20 +0300 Subject: [PATCH] progress --- .../src/features/weights/models/weights_database_model.ts | 2 ++ .../features/weights/models/weights_validation_model.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/server/src/features/weights/models/weights_database_model.ts b/server/src/features/weights/models/weights_database_model.ts index 1a0f986..67358c6 100644 --- a/server/src/features/weights/models/weights_database_model.ts +++ b/server/src/features/weights/models/weights_database_model.ts @@ -2,6 +2,8 @@ import { IsNumber, IsString } from "class-validator"; import { IWeightModel } from "./weights_validation_model"; export class WeightValidationModel implements IWeightModel { + @IsNumber() + public numberOfTrainedEpochs: number; public processStatus: string; @IsNumber() public epoch: number; diff --git a/server/src/features/weights/models/weights_validation_model.ts b/server/src/features/weights/models/weights_validation_model.ts index b4a4f66..ca8b203 100644 --- a/server/src/features/weights/models/weights_validation_model.ts +++ b/server/src/features/weights/models/weights_validation_model.ts @@ -9,6 +9,7 @@ export interface IWeightModel { project: string | IProjectModel; processStatus: string; epoch: number; + numberOfTrainedEpochs: number; } export const WeightSchema = new Schema({ name: { @@ -17,6 +18,9 @@ export const WeightSchema = new Schema({ local_path: { type: String, }, + numberOfTrainedEpochs: { + type: Number, + }, neuralNetworkName: { type: String, }, @@ -30,8 +34,8 @@ export const WeightSchema = new Schema({ type: Boolean, default: false, }, - epoch:{ - type:Number, + epoch: { + type: Number, }, datasetId: { type: Schema.Types.ObjectId,