Unverified Commit 93dae28f authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

Fix issue #124: Rest service api/v1/nni/metric-data can not retrieve metric...

Fix issue #124:  Rest service api/v1/nni/metric-data can not retrieve metric data for multiple trial jobs (#188)

* Pull latest code (#2)

* webui logpath and document (#135)

* Add webui document and logpath as a href

* fix tslint

* fix comments by Chengmin

* Pai training service bug fix and enhancement (#136)

* Add NNI installation scripts

* Update pai script, update NNI_out_dir

* Update NNI dir in nni sdk local.py

* Create .nni folder in nni sdk local.py

* Add check before creating .nni folder

* Fix typo for PAI_INSTALL_NNI_SHELL_FORMAT

* Improve annotation (#138)

* Improve annotation

* Minor bugfix

* Selectively install through pip (#139)

Selectively install through pip 
* update setup.py

* fix paiTrainingService bugs (#137)

* fix nnictl bug

* add hdfs host validation

* fix bugs

* fix dockerfile

* fix install.sh

* update install.sh

* fix dockerfile

* Set timeout for HDFSUtility exists function

* remove unused TODO

* fix sdk

* add optional for outputDir and dataDir

* refactor dockerfile.base

* Remove unused import in hdfsclientUtility

* Add documentation for NNI PAI mode experiment (#141)

* Add documentation for NNI PAI mode

* Fix typo based on PR comments

* Exit with subprocess return code of trial keeper

* Remove additional exit code

* Fix typo based on PR comments

* update doc for smac tuner (#140)

* Revert "Selectively install through pip (#139)" due to potential pip install issue (#142)

* Revert "Selectively install through pip (#139)"

This reverts commit 1d174836.

* Add exit code of subprocess for trial_keeper

* Update README, add link to PAImode doc

* fix bug (#147)

* Refactor nnictl and add config_pai.yml (#144)

* fix nnictl bug

* add hdfs host validation

* fix bugs

* fix dockerfile

* fix install.sh

* update install.sh

* fix dockerfile

* Set timeout for HDFSUtility exists function

* remove unused TODO

* fix sdk

* add optional for outputDir and dataDir

* refactor dockerfile.base

* Remove unused import in hdfsclientUtility

* add config_pai.yml

* refactor nnictl create logic and add colorful print

* fix nnictl stop logic

* add annotation for config_pai.yml

* add document for start experiment

* fix config.yml

* fix document

* Fix trial keeper wrongly exit issue (#152)

* Fix trial keeper bug, use actual exitcode to exit rather than 1

* Fix bug of table sort (#145)

* Update doc for PAIMode and v0.2 release notes (#153)

* Update v0.2 documentation regards to release note and PAI training service

* Update document to describe NNI docker image

* Bug fix for SQuAD example tuner. (#134)

* Update Makefile (#151)

* test

* update setup.py

* update Makefile and install.sh

* rever setup.py

* change color

* update doc

* update doc

* fix auto-completion's extra space

* update Makefile

* update webui

* Update doc image (#163)

* update doc

* trivial

* trivial

* trivial

* trivial

* trivial

* trivial

* update image

* update image size

* Update ga squad (#104)

* update readme in ga_squad

* update readme

* fix typo

* Update README.md

* Update README.md

* Update README.md

* update readme

* sklearn examples (#169)

* fix nnictl bug

* fix install.sh

* add sklearn-regression example

* add sklearn classification

* update sklearn

* update example

* remove additional code

* Update batch tuner (#158)

* update readme in ga_squad

* update readme

* fix typo

* Update README.md

* Update README.md

* Update README.md

* update readme

* update batch tuner

* Quickly fix cascading search space bug in tuner (#156)

* update readme in ga_squad

* update readme

* fix typo

* Update README.md

* Update README.md

* Update README.md

* update readme

* quickly fix cascading searchspace bug in tuner

* Add iterative search space example (#119)

* update readme in ga_squad

* update readme

* fix typo

* Update README.md

* Update README.md

* Update README.md

* update readme

* add iterative search space example

* update

* update readme

* change name

* getMetricData supports multiple trial jobs
parent 334cad50
...@@ -78,7 +78,7 @@ abstract class DataStore { ...@@ -78,7 +78,7 @@ abstract class DataStore {
public abstract listTrialJobs(status?: TrialJobStatus): Promise<TrialJobInfo[]>; public abstract listTrialJobs(status?: TrialJobStatus): Promise<TrialJobInfo[]>;
public abstract getTrialJob(trialJobId: string): Promise<TrialJobInfo>; public abstract getTrialJob(trialJobId: string): Promise<TrialJobInfo>;
public abstract storeMetricData(trialJobId: string, data: string): Promise<void>; public abstract storeMetricData(trialJobId: string, data: string): Promise<void>;
public abstract getMetricData(trialJobId: string, metricType: MetricType): Promise<MetricDataRecord[]>; public abstract getMetricData(trialJobId?: string, metricType?: MetricType): Promise<MetricDataRecord[]>;
} }
abstract class Database { abstract class Database {
......
...@@ -92,7 +92,7 @@ abstract class Manager { ...@@ -92,7 +92,7 @@ abstract class Manager {
public abstract setClusterMetadata(key: string, value: string): Promise<void>; public abstract setClusterMetadata(key: string, value: string): Promise<void>;
public abstract getClusterMetadata(key: string): Promise<string>; public abstract getClusterMetadata(key: string): Promise<string>;
public abstract getMetricData(trialJobId: string, metricType: MetricType): Promise<MetricDataRecord[]>; public abstract getMetricData(trialJobId?: string, metricType?: MetricType): Promise<MetricDataRecord[]>;
public abstract getTrialJobStatistics(): Promise<TrialJobStatistics[]>; public abstract getTrialJobStatistics(): Promise<TrialJobStatistics[]>;
public abstract getStatus(): NNIManagerStatus; public abstract getStatus(): NNIManagerStatus;
} }
......
...@@ -138,7 +138,7 @@ class NNIDataStore implements DataStore { ...@@ -138,7 +138,7 @@ class NNIDataStore implements DataStore {
})); }));
} }
public getMetricData(trialJobId: string, metricType: MetricType): Promise<MetricDataRecord[]> { public getMetricData(trialJobId?: string, metricType?: MetricType): Promise<MetricDataRecord[]> {
return this.db.queryMetricData(trialJobId, metricType); return this.db.queryMetricData(trialJobId, metricType);
} }
......
...@@ -204,7 +204,7 @@ class NNIManager implements Manager { ...@@ -204,7 +204,7 @@ class NNIManager implements Manager {
} }
} }
public async getMetricData(trialJobId: string, metricType: MetricType): Promise<MetricDataRecord[]> { public async getMetricData(trialJobId?: string, metricType?: MetricType): Promise<MetricDataRecord[]> {
return this.dataStore.getMetricData(trialJobId, metricType); return this.dataStore.getMetricData(trialJobId, metricType);
} }
......
...@@ -245,7 +245,7 @@ class NNIRestHandler { ...@@ -245,7 +245,7 @@ class NNIRestHandler {
} }
private getMetricData(router: Router): void { private getMetricData(router: Router): void {
router.get('/metric-data/:job_id', async (req: Request, res: Response) => { router.get('/metric-data/:job_id*?', async (req: Request, res: Response) => {
this.nniManager.getMetricData(req.params.job_id, req.query.type).then((metricsData: MetricDataRecord[]) => { this.nniManager.getMetricData(req.params.job_id, req.query.type).then((metricsData: MetricDataRecord[]) => {
res.send(metricsData); res.send(metricsData);
}).catch((err: Error) => { }).catch((err: Error) => {
......
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