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 {
protected abstract sendCommandInternal(environment: EnvironmentInformation, message: string): Promise<void>;
protected abstract createRunnerConnection(environment: EnvironmentInformation): RunnerConnection;
public async sendCommand(environment: EnvironmentInformation, commantType: string, data: any): Promise<void> {
const command = encodeCommand(commantType, JSON.stringify(data));
public async sendCommand(environment: EnvironmentInformation, commandType: string, data: any): Promise<void> {
const command = encodeCommand(commandType, JSON.stringify(data));
this.log.debug(`CommandChannel: env ${environment.id} sending command: ${command}`);
await this.sendCommandInternal(environment, command.toString("utf8"));
}
......
......@@ -65,7 +65,7 @@ export class EnvironmentInformation {
public nodeCount: number = 1;
// 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>();
// use can specify which gpus can be used by NNI.
......@@ -80,7 +80,7 @@ export class EnvironmentInformation {
this.id = id;
this.name = name;
this.envId = envId ? envId : name;
this.nodes = new Map<string, NodeInfomation>();
this.nodes = new Map<string, NodeInformation>();
}
public setStatus(status: EnvironmentStatus): void {
......@@ -145,12 +145,12 @@ export abstract class EnvironmentService {
return new WebCommandChannel(commandEmitter);
}
public createEnviornmentInfomation(envId: string, envName: string): EnvironmentInformation {
public createEnvironmentInformation(envId: string, envName: string): EnvironmentInformation {
return new EnvironmentInformation(envId, envName);
}
}
export class NodeInfomation {
export class NodeInformation {
public id: string;
public status: TrialJobStatus = "UNKNOWN";
public endTime?: number;
......
......@@ -45,7 +45,7 @@ export class AMLEnvironmentService extends EnvironmentService {
return new AMLCommandChannel(commandEmitter);
}
public createEnviornmentInfomation(envId: string, envName: string): EnvironmentInformation {
public createEnvironmentInformation(envId: string, envName: string): EnvironmentInformation {
return new AMLEnvironmentInformation(envId, envName);
}
......
......@@ -5,7 +5,7 @@
import { TrialJobApplicationForm, TrialJobDetail, TrialJobStatus } from "../../common/trainingService";
import { GPUInfo } from "../../training_service/common/gpuData";
import { EnvironmentInformation, NodeInfomation } from "./environment";
import { EnvironmentInformation, NodeInformation } from "./environment";
export class TrialDetail implements TrialJobDetail {
public id: string;
......@@ -23,7 +23,7 @@ export class TrialDetail implements TrialJobDetail {
// init settings of trial
public settings = {};
// 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.
public assignedGpus: GPUInfo[] | undefined;
......@@ -37,6 +37,6 @@ export class TrialDetail implements TrialJobDetail {
this.workingDirectory = workingDirectory;
this.form = form;
this.tags = [];
this.nodes = new Map<string, NodeInfomation>();
this.nodes = new Map<string, NodeInformation>();
}
}
......@@ -21,7 +21,7 @@ import { TrialConfig } from '../common/trialConfig';
import { TrialConfigMetadataKey } from '../common/trialConfigMetadataKey';
import { validateCodeDir } from '../common/util';
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 { MountedStorageService } from './storages/mountedStorageService';
import { StorageService } from './storageService';
......@@ -587,7 +587,7 @@ class TrialDispatcher implements TrainingService {
const environmentService = component.get<EnvironmentService>(EnvironmentService);
const envId = uniqueString(5);
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`;
......@@ -737,7 +737,7 @@ class TrialDispatcher implements TrainingService {
if (environment.nodeCount > 1) {
let node = environment.nodes.get(nodeId);
if (node === undefined) {
node = new NodeInfomation(nodeId);
node = new NodeInformation(nodeId);
environment.nodes.set(nodeId, node);
}
const oldNodeStatus = node.status;
......@@ -796,7 +796,7 @@ class TrialDispatcher implements TrainingService {
let node = environment.nodes.get(nodeId);
if (node === undefined) {
node = new NodeInfomation(nodeId);
node = new NodeInformation(nodeId);
trial.nodes.set(nodeId, 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