This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cherry pick to pai-1.4.y] sync master change (#5144)
* Visualized mnist500task (#5131) * update marketplace image version to 1.3.0 (#5137) Co-authored-by: AmberMsy <[email protected]>
- Loading branch information
Showing
10 changed files
with
166 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
import os | ||
import csv | ||
import time | ||
import argparse | ||
import shutil | ||
|
||
def summary(filepath, result_path): | ||
with open(filepath, 'r') as f: | ||
csv_read = csv.reader(f) | ||
with open(result_path, 'a') as r: | ||
csv_write = csv.writer(r) | ||
for line in csv_read: | ||
csv_write.writerow(line) | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='Display Results') | ||
parser.add_argument('--number', type=int, default=500, | ||
help='The number of learning rates') | ||
parser.add_argument('--data_path', default='./mnist500_result/', | ||
help='The number of learning rates') | ||
args = parser.parse_args() | ||
|
||
path = args.data_path | ||
if not os.path.exists(path): | ||
os.makedirs(path) | ||
# Waiting for all results | ||
while(len([lists for lists in os.listdir(path)]) < args.number): | ||
for file in os.listdir('.'): | ||
if file[-4:]=='.csv': | ||
shutil.move(file, os.path.join(path, file)) | ||
time.sleep(1) | ||
for file in os.listdir('.'): | ||
if file[-4:]=='.csv': | ||
shutil.move(file, os.path.join(path, file)) | ||
|
||
for file in os.listdir(path): | ||
filepath = os.path.join(path, file) | ||
if os.path.isfile(filepath) and file[-4:]=='.csv': | ||
summary(filepath, 'results.csv') | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": 3 | ||
}, | ||
"orig_nbformat": 2 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2, | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"\n", | ||
"results = np.genfromtxt('./results.csv', delimiter=\",\", names=[\"LR\",\"ACC\"])\n", | ||
"plt.plot(results[\"LR\"], results[\"ACC\"], 'o')\n", | ||
"plt.xlabel('Learning Rate')\n", | ||
"plt.ylabel('Accuracy')\n", | ||
"plt.show()" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/marketplace-restserver/build/marketplace-restserver.k8s.dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
FROM docker.io/openpai/pai-marketplace-restserver:v1.2.0 | ||
FROM docker.io/openpai/pai-marketplace-restserver:v1.3.0 |
2 changes: 1 addition & 1 deletion
2
src/marketplace-webportal/build/marketplace-webportal.k8s.dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
FROM docker.io/openpai/pai-marketplace-webportal:v1.2.0 | ||
FROM docker.io/openpai/pai-marketplace-webportal:v1.3.0 |