Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
fix some spelling (#2855)
Browse files Browse the repository at this point in the history
Co-authored-by: Ning Shang <[email protected]>
  • Loading branch information
J-shang and Ning Shang authored Sep 9, 2020
1 parent 2a8b0f6 commit 0a21a90
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/nni_manager/training_service/reusable/commandChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down
8 changes: 4 additions & 4 deletions src/nni_manager/training_service/reusable/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions src/nni_manager/training_service/reusable/trial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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>();
}
}
8 changes: 4 additions & 4 deletions src/nni_manager/training_service/reusable/trialDispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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`;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0a21a90

Please sign in to comment.