Unverified Commit 0a21a901 authored by J-shang's avatar J-shang Committed by GitHub
Browse files

fix some spelling (#2855)


Co-authored-by: default avatarNing Shang <nishang@microsoft.com>
parent 2a8b0f6f
...@@ -65,8 +65,8 @@ export abstract class CommandChannel { ...@@ -65,8 +65,8 @@ export abstract class CommandChannel {
protected abstract sendCommandInternal(environment: EnvironmentInformation, message: string): Promise<void>; protected abstract sendCommandInternal(environment: EnvironmentInformation, message: string): Promise<void>;
protected abstract createRunnerConnection(environment: EnvironmentInformation): RunnerConnection; protected abstract createRunnerConnection(environment: EnvironmentInformation): RunnerConnection;
public async sendCommand(environment: EnvironmentInformation, commantType: string, data: any): Promise<void> { public async sendCommand(environment: EnvironmentInformation, commandType: string, data: any): Promise<void> {
const command = encodeCommand(commantType, JSON.stringify(data)); const command = encodeCommand(commandType, JSON.stringify(data));
this.log.debug(`CommandChannel: env ${environment.id} sending command: ${command}`); this.log.debug(`CommandChannel: env ${environment.id} sending command: ${command}`);
await this.sendCommandInternal(environment, command.toString("utf8")); await this.sendCommandInternal(environment, command.toString("utf8"));
} }
......
...@@ -65,7 +65,7 @@ export class EnvironmentInformation { ...@@ -65,7 +65,7 @@ export class EnvironmentInformation {
public nodeCount: number = 1; public nodeCount: number = 1;
// it's used to aggregate node status for multiple node trial // it's used to aggregate node status for multiple node trial
public nodes: Map<string, NodeInfomation>; public nodes: Map<string, NodeInformation>;
public gpuSummaries: Map<string, TrialGpuSummary> = new Map<string, TrialGpuSummary>(); public gpuSummaries: Map<string, TrialGpuSummary> = new Map<string, TrialGpuSummary>();
// use can specify which gpus can be used by NNI. // use can specify which gpus can be used by NNI.
...@@ -80,7 +80,7 @@ export class EnvironmentInformation { ...@@ -80,7 +80,7 @@ export class EnvironmentInformation {
this.id = id; this.id = id;
this.name = name; this.name = name;
this.envId = envId ? envId : name; this.envId = envId ? envId : name;
this.nodes = new Map<string, NodeInfomation>(); this.nodes = new Map<string, NodeInformation>();
} }
public setStatus(status: EnvironmentStatus): void { public setStatus(status: EnvironmentStatus): void {
...@@ -145,12 +145,12 @@ export abstract class EnvironmentService { ...@@ -145,12 +145,12 @@ export abstract class EnvironmentService {
return new WebCommandChannel(commandEmitter); return new WebCommandChannel(commandEmitter);
} }
public createEnviornmentInfomation(envId: string, envName: string): EnvironmentInformation { public createEnvironmentInformation(envId: string, envName: string): EnvironmentInformation {
return new EnvironmentInformation(envId, envName); return new EnvironmentInformation(envId, envName);
} }
} }
export class NodeInfomation { export class NodeInformation {
public id: string; public id: string;
public status: TrialJobStatus = "UNKNOWN"; public status: TrialJobStatus = "UNKNOWN";
public endTime?: number; public endTime?: number;
......
...@@ -45,7 +45,7 @@ export class AMLEnvironmentService extends EnvironmentService { ...@@ -45,7 +45,7 @@ export class AMLEnvironmentService extends EnvironmentService {
return new AMLCommandChannel(commandEmitter); return new AMLCommandChannel(commandEmitter);
} }
public createEnviornmentInfomation(envId: string, envName: string): EnvironmentInformation { public createEnvironmentInformation(envId: string, envName: string): EnvironmentInformation {
return new AMLEnvironmentInformation(envId, envName); return new AMLEnvironmentInformation(envId, envName);
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import { TrialJobApplicationForm, TrialJobDetail, TrialJobStatus } from "../../common/trainingService"; import { TrialJobApplicationForm, TrialJobDetail, TrialJobStatus } from "../../common/trainingService";
import { GPUInfo } from "../../training_service/common/gpuData"; import { GPUInfo } from "../../training_service/common/gpuData";
import { EnvironmentInformation, NodeInfomation } from "./environment"; import { EnvironmentInformation, NodeInformation } from "./environment";
export class TrialDetail implements TrialJobDetail { export class TrialDetail implements TrialJobDetail {
public id: string; public id: string;
...@@ -23,7 +23,7 @@ export class TrialDetail implements TrialJobDetail { ...@@ -23,7 +23,7 @@ export class TrialDetail implements TrialJobDetail {
// init settings of trial // init settings of trial
public settings = {}; public settings = {};
// it's used to aggregate node status for multiple node trial // it's used to aggregate node status for multiple node trial
public nodes: Map<string, NodeInfomation>; public nodes: Map<string, NodeInformation>;
// assigned GPUs for multi-trial scheduled. // assigned GPUs for multi-trial scheduled.
public assignedGpus: GPUInfo[] | undefined; public assignedGpus: GPUInfo[] | undefined;
...@@ -37,6 +37,6 @@ export class TrialDetail implements TrialJobDetail { ...@@ -37,6 +37,6 @@ export class TrialDetail implements TrialJobDetail {
this.workingDirectory = workingDirectory; this.workingDirectory = workingDirectory;
this.form = form; this.form = form;
this.tags = []; this.tags = [];
this.nodes = new Map<string, NodeInfomation>(); this.nodes = new Map<string, NodeInformation>();
} }
} }
...@@ -21,7 +21,7 @@ import { TrialConfig } from '../common/trialConfig'; ...@@ -21,7 +21,7 @@ import { TrialConfig } from '../common/trialConfig';
import { TrialConfigMetadataKey } from '../common/trialConfigMetadataKey'; import { TrialConfigMetadataKey } from '../common/trialConfigMetadataKey';
import { validateCodeDir } from '../common/util'; import { validateCodeDir } from '../common/util';
import { Command, CommandChannel } from './commandChannel'; import { Command, CommandChannel } from './commandChannel';
import { EnvironmentInformation, EnvironmentService, NodeInfomation, RunnerSettings, TrialGpuSummary } from './environment'; import { EnvironmentInformation, EnvironmentService, NodeInformation, RunnerSettings, TrialGpuSummary } from './environment';
import { GpuScheduler } from './gpuScheduler'; import { GpuScheduler } from './gpuScheduler';
import { MountedStorageService } from './storages/mountedStorageService'; import { MountedStorageService } from './storages/mountedStorageService';
import { StorageService } from './storageService'; import { StorageService } from './storageService';
...@@ -587,7 +587,7 @@ class TrialDispatcher implements TrainingService { ...@@ -587,7 +587,7 @@ class TrialDispatcher implements TrainingService {
const environmentService = component.get<EnvironmentService>(EnvironmentService); const environmentService = component.get<EnvironmentService>(EnvironmentService);
const envId = uniqueString(5); const envId = uniqueString(5);
const envName = `nni_exp_${this.experimentId}_env_${envId}`; const envName = `nni_exp_${this.experimentId}_env_${envId}`;
const environment = environmentService.createEnviornmentInfomation(envId, envName); const environment = environmentService.createEnvironmentInformation(envId, envName);
environment.command = `sh ../install_nni.sh && python3 -m nni_trial_tool.trial_runner`; environment.command = `sh ../install_nni.sh && python3 -m nni_trial_tool.trial_runner`;
...@@ -737,7 +737,7 @@ class TrialDispatcher implements TrainingService { ...@@ -737,7 +737,7 @@ class TrialDispatcher implements TrainingService {
if (environment.nodeCount > 1) { if (environment.nodeCount > 1) {
let node = environment.nodes.get(nodeId); let node = environment.nodes.get(nodeId);
if (node === undefined) { if (node === undefined) {
node = new NodeInfomation(nodeId); node = new NodeInformation(nodeId);
environment.nodes.set(nodeId, node); environment.nodes.set(nodeId, node);
} }
const oldNodeStatus = node.status; const oldNodeStatus = node.status;
...@@ -796,7 +796,7 @@ class TrialDispatcher implements TrainingService { ...@@ -796,7 +796,7 @@ class TrialDispatcher implements TrainingService {
let node = environment.nodes.get(nodeId); let node = environment.nodes.get(nodeId);
if (node === undefined) { if (node === undefined) {
node = new NodeInfomation(nodeId); node = new NodeInformation(nodeId);
trial.nodes.set(nodeId, node); trial.nodes.set(nodeId, node);
} }
if (undefined === node) { if (undefined === node) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment