Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
nni | nni-master/examples/trials/mnist-tfv1/config_kubeflow.yml | authorName: default
experimentName: example_dist
trialConcurrency: 1
maxExecDuration: 1h
maxTrialNum: 1
#choice: local, remote, pai, kubeflow
trainingServicePlatform: kubeflow
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, Metis... | 720 | 21.53125 | 74 | yml |
nni | nni-master/examples/trials/mnist-tfv1/config_pai.yml | authorName: default
experimentName: example_mnist
trialConcurrency: 1
maxExecDuration: 1h
maxTrialNum: 10
#choice: local, remote, pai
trainingServicePlatform: pai
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner, GPTune... | 971 | 26.771429 | 74 | yml |
nni | nni-master/examples/trials/mnist-tfv1/config_windows.yml | authorName: default
experimentName: example_mnist
trialConcurrency: 1
maxExecDuration: 1h
maxTrialNum: 10
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner, GPTu... | 530 | 23.136364 | 74 | yml |
nni | nni-master/examples/trials/mnist-tfv1/launch_hybrid.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Example showing how to create experiment with Python code.
"""
from pathlib import Path
from nni.experiment import Experiment, RemoteMachineConfig
search_space = {
"dropout_rate": { "_type": "uniform", "_value": [0.5, 0.9] },
"conv... | 1,358 | 33.846154 | 80 | py |
nni | nni-master/examples/trials/mnist-tfv1/mnist.py | """A deep MNIST classifier using convolutional layers."""
import argparse
import logging
import math
import tempfile
import time
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import nni
FLAGS = None
logger = logging.getLogger('mnist_AutoML')
class MnistNetwork(object):
''... | 9,453 | 38.556485 | 114 | py |
nni | nni-master/examples/trials/mnist-tfv1/mnist_before.py | """A deep MNIST classifier using convolutional layers."""
import argparse
import logging
import math
import tempfile
import time
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
FLAGS = None
logger = logging.getLogger('mnist_AutoML')
class MnistNetwork(object):
'''
MnistNe... | 9,214 | 38.549356 | 114 | py |
nni | nni-master/examples/trials/mnist-tfv2/config.yml | # This is the minimal config file for an NNI experiment.
# Use "nnictl create --config config.yml" to launch this experiment.
# Afterwards, you can check "config_detailed.yml" for more explanation.
searchSpaceFile: search_space.json
trialCommand: python3 mnist.py # NOTE: change "python3" to "python" if you are using ... | 461 | 29.8 | 93 | yml |
nni | nni-master/examples/trials/mnist-tfv2/config_assessor.yml | searchSpaceFile: search_space.json
trialCommand: python3 mnist.py
trialGpuNumber: 0
trialConcurrency: 2
maxTrialNumber: 50
tuner:
name: TPE
classArgs:
optimize_mode: maximize
assessor: # Specify early-stop algorithm
name: Curvefitting
classArgs:
epoch_num: 20
threshold: 0.9
trainingService:
platf... | 331 | 18.529412 | 41 | yml |
nni | nni-master/examples/trials/mnist-tfv2/config_detailed.yml | # This example shows more configurable fields comparing to the minimal "config.yml"
# You can use "nnictl create --config config_detailed.yml" to launch this experiment.
# If you see an error message saying "port 8080 is used", use "nnictl stop --all" to stop previous experiments.
experimentName: MNIST # An ... | 2,521 | 50.469388 | 139 | yml |
nni | nni-master/examples/trials/mnist-tfv2/config_hybrid.yml | searchSpaceFile: search_space.json
trialCommand: python3 mnist.py
trialGpuNumber: 0
trialConcurrency: 5
maxTrialNumber: 20
tuner:
name: TPE
classArgs:
optimize_mode: maximize
# For local, remote, openpai, and aml, NNI can use multiple training services at one time
trainingService:
- platform: local
- platfo... | 1,521 | 23.548387 | 89 | yml |
nni | nni-master/examples/trials/mnist-tfv2/config_remote.yml | searchSpaceFile: search_space.json
trialCommand: python3 mnist.py
trialGpuNumber: 0
trialConcurrency: 4
maxTrialNumber: 20
tuner:
name: TPE
classArgs:
optimize_mode: maximize
trainingService:
platform: remote
machineList:
- host: ${your server's IP or domain name}
user: ${your user name}
ssh... | 864 | 33.6 | 165 | yml |
nni | nni-master/examples/trials/mnist-tfv2/config_windows.yml | searchSpaceFile: search_space.json
trialCommand: python mnist.py
trialGpuNumber: 0
trialConcurrency: 1
tuner:
name: TPE
classArgs:
optimize_mode: maximize
trainingService:
platform: local
| 198 | 17.090909 | 34 | yml |
nni | nni-master/examples/trials/mnist-tfv2/launch.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Example showing how to create experiment with Python code.
"""
from pathlib import Path
from nni.experiment import Experiment
search_space = {
"dropout_rate": { "_type": "uniform", "_value": [0.5, 0.9] },
"conv_size": { "_type": "c... | 1,077 | 32.6875 | 80 | py |
nni | nni-master/examples/trials/mnist-tfv2/mnist.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
NNI example trial code.
- Experiment type: Hyper-parameter Optimization
- Trial framework: Tensorflow v2.x (Keras API)
- Model: LeNet-5
- Dataset: MNIST
"""
import logging
import tensorflow as tf
from tensorflow.keras import Model
from ten... | 4,468 | 29.401361 | 100 | py |
nni | nni-master/examples/trials/network_morphism/README.md | # Network Morphism for Automatic Model Architecture Search in NNI
The Network Morphism is a build-in Tuner using network morphism techniques to search and evaluate the new network architecture. This example shows us how to use it to find good model architectures for deep learning.
## How to run this example?
### 1. T... | 4,908 | 44.036697 | 478 | md |
nni | nni-master/examples/trials/network_morphism/README_zh_CN.md | # 在 NNI 中用网络形态算法来进行自动模型结构搜索
Network Morphism (网络形态)是内置的 Tuner,它使用了网络形态技术来搜索和评估新的网络结构。 该示例展示了如何使用它来为深度学习找到好的模型架构。
## 如何运行此示例?
### 1. 训练框架支持
网络形态当前基于框架,还没有实现与框架脱离的方法。 当前支持 PyTorch 和 Keras。 如果熟悉 JSON 中间格式,可以在自定义的训练框架中生成自己的模型。 随后,我们会将中间结果从 JSON 转换为 ONNX,从而能够成为[标准的中间表示](https://github.com/onnx/onnx/blob/master/docs/IR.m... | 2,932 | 26.157407 | 211 | md |
nni | nni-master/examples/trials/network_morphism/FashionMNIST/FashionMNIST_keras.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 6,484 | 30.634146 | 128 | py |
nni | nni-master/examples/trials/network_morphism/FashionMNIST/FashionMNIST_pytorch.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 7,734 | 29.214844 | 128 | py |
nni | nni-master/examples/trials/network_morphism/FashionMNIST/__init__.py | 0 | 0 | 0 | py | |
nni | nni-master/examples/trials/network_morphism/FashionMNIST/config.yml | trialCommand: python3 FashionMNIST_keras.py
trialGpuNumber: 1
trialConcurrency: 4
maxExperimentDuration: 48h
maxTrialNumber: 200
searchSpace: {} # search space of NetworkMorphism is provided via classArgs
tuner:
name: NetworkMorphism
classArgs:
optimize_mode: maximize # maximize or minimize
task: cv ... | 825 | 42.473684 | 134 | yml |
nni | nni-master/examples/trials/network_morphism/FashionMNIST/utils.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 6,642 | 32.720812 | 128 | py |
nni | nni-master/examples/trials/network_morphism/cifar10/__init__.py | 0 | 0 | 0 | py | |
nni | nni-master/examples/trials/network_morphism/cifar10/cifar10_keras.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 6,421 | 30.326829 | 128 | py |
nni | nni-master/examples/trials/network_morphism/cifar10/cifar10_pytorch.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 7,522 | 29.45749 | 128 | py |
nni | nni-master/examples/trials/network_morphism/cifar10/config.yml | trialCommand: python3 cifar10_keras.py
trialGpuNumber: 1
trialConcurrency: 4
maxExperimentDuration: 48h
maxTrialNumber: 200
searchSpace: {} # search space of NetworkMorphism is provided via classArgs
tuner:
name: NetworkMorphism
classArgs:
optimize_mode: maximize # maximize or minimize
task: cv ... | 820 | 42.210526 | 134 | yml |
nni | nni-master/examples/trials/network_morphism/cifar10/utils.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 6,642 | 32.720812 | 128 | py |
nni | nni-master/examples/trials/pix2pix-pytorch/base_params.py |
def get_base_params(dataset_name, checkpoint_dir):
params = {}
# change name and gpuid later
basic_params = {'dataset': dataset_name,
'dataroot': './data/' + dataset_name,
'name': '',
'gpu_ids': [0],
'checkpoints_dir': chec... | 2,517 | 33.493151 | 57 | py |
nni | nni-master/examples/trials/pix2pix-pytorch/config.yml | experimentName: example_pix2pix
searchSpace:
ngf:
_type: choice
_value: [16, 32, 64, 128]
ndf:
_type: choice
_value: [16, 32, 64, 128]
netG:
_type: choice
_value: ["unet_256", "resnet_9blocks"]
netD:
_type: choice
_value: ["basic", "pixel", "n_layers"]
norm:
_type: choice
... | 1,035 | 21.042553 | 61 | yml |
nni | nni-master/examples/trials/pix2pix-pytorch/pix2pix.py | import sys
sys.path.insert(0, './pix2pixlib')
import os
import pathlib
import logging
import time
import argparse
from collections import namedtuple
import numpy as np
import torch
import torch.utils.data as data
import nni
from nni.utils import merge_parameter
from pix2pixlib.data.aligned_dataset import AlignedDatase... | 8,548 | 44.962366 | 194 | py |
nni | nni-master/examples/trials/pix2pix-pytorch/setup.sh | #!/bin/bash
# download pix2pix repository
if [ ! -d './pix2pixlib' ] ; then
git clone https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix.git pix2pixlib
fi
| 165 | 22.714286 | 84 | sh |
nni | nni-master/examples/trials/pix2pix-pytorch/test.py | import sys
sys.path.insert(0, './pix2pixlib')
import os
import pathlib
import logging
import argparse
import json
from collections import namedtuple
from PIL import Image
import numpy as np
import torch
from nni.utils import merge_parameter
from pix2pixlib.data.aligned_dataset import AlignedDataset
from pix2pixlib.dat... | 6,783 | 47.113475 | 194 | py |
nni | nni-master/examples/trials/sklearn/classification/config.yml | searchSpaceFile: search_space.json
trialCommand: python3 main.py
trialConcurrency: 1
maxTrialNumber: 100
maxExperimentDuration: 1h
tuner:
name: TPE
classArgs:
optimize_mode: maximize
trainingService: # For other platforms, check mnist-pytorch example
platform: local
| 278 | 22.25 | 68 | yml |
nni | nni-master/examples/trials/sklearn/classification/main.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 2,981 | 34.5 | 128 | py |
nni | nni-master/examples/trials/sklearn/regression/config.yml | searchSpaceFile: search_space.json
trialCommand: python3 main.py
trialConcurrency: 1
maxTrialNumber: 30
maxExperimentDuration: 1h
tuner:
name: TPE
classArgs:
optimize_mode: maximize
trainingService: # For other platforms, check mnist-pytorch example
platform: local
| 277 | 22.166667 | 68 | yml |
nni | nni-master/examples/trials/sklearn/regression/main.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 3,481 | 35.652632 | 128 | py |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/compiler_auto_tune_stable.py | #!/usr/bin/env python3
## TODO: optimize c-mcpu metric; early-stop handler; fp16/int8; Kill pyRPC;
import numpy as np
import tvm
import logging
import math
import re
import sys, time, subprocess, os, random, hashlib
from tvm import autotvm
import topi
import json
from topi.util import get_const_tuple
import importlib... | 14,929 | 36.325 | 213 | py |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/run.sh | #!/bin/bash -e
cd $(dirname $0)
export BACKEND=${BACKEND:-c-cuda}
if [[ "${BACKEND}" == "c-cuda" ]]; then
export BACKEND="#cuda"
fi
if [[ "${BACKEND}" != "#cuda" ]]; then
export LD_LIBRARY_PATH=/opt/tvm/build
else
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
fi
export HIP_PLATFORM=hcc
ex... | 570 | 20.961538 | 95 | sh |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/algorithms/gbfs.py | import math
import random
import logging
import copy
import nni
from nni.tuner import Tuner
class Factor(object):
"""factor type parameter
"""
def __init__(self, value):
self.product, self.num = value
self.partition = [1] * self.num
self.partition[0] = self.product
def pick_o... | 8,794 | 30.523297 | 86 | py |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/algorithms/na2c.py | import math
import random
import logging
import copy
import torch
from torch import optim
from torch import nn
import torch.nn.functional as F
import numpy as np
import nni
from nni.tuner import Tuner
class Factor(object):
"""factor type parameter
"""
def __init__(self, value):
self.product, sel... | 13,052 | 31.470149 | 86 | py |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/algorithms/opevo.py | import math
import logging
import copy
import random
import numpy as np
from itertools import permutations, combinations
import nni
from nni.tuner import Tuner
class Parameter(object):
"""Base class for all types of parameters
"""
def mutate(self):
raise NotImplementedError
def reset(self):
... | 14,940 | 31.837363 | 85 | py |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/bmm/B960N128K128M64PNN/config_opevo.yml | authorName: default
experimentName: BatchMatMul_B960N128K128M64PNN_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: ... | 694 | 25.730769 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/bmm/B960N128K128M64PTN/config_opevo.yml | authorName: default
experimentName: BatchMatMul_B960N128K128M64PTN_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: ... | 694 | 25.730769 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/bmm/B960N128K64M128PNT/config_opevo.yml | authorName: default
experimentName: BatchMatMul_B960N128K64M128PNT_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: ... | 694 | 25.730769 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/conv/N512C3HW227F64K11ST4PD0/config_opevo.yml | authorName: default
experimentName: Conv_N512C3HW227F64K11ST4PD0_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: op... | 708 | 26.269231 | 79 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/conv/N512C64HW27F192K5ST1PD2/config_opevo.yml | authorName: default
experimentName: Conv_N512C64HW27F192K5ST1PD2_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: op... | 707 | 26.230769 | 78 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K1024M1024/config_gbfs.yml | authorName: default
experimentName: MatMul_N512K1024M1024_GBFS
trialConcurrency: 5
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: gbfs.py
... | 630 | 25.291667 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K1024M1024/config_na2c.yml | authorName: default
experimentName: MatMul_N512K1024M1024_NA2C
trialConcurrency: 6
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: na2c.py
... | 611 | 25.608696 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K1024M1024/config_opevo.yml | authorName: default
experimentName: MatMul_N512K1024M1024_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: opevo.py
... | 676 | 25.038462 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K1024M4096/config_gbfs.yml | authorName: default
experimentName: MatMul_N512K1024M4096_GBFS
trialConcurrency: 5
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: gbfs.py
... | 630 | 25.291667 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K1024M4096/config_na2c.yml | authorName: default
experimentName: MatMul_N512K1024M4096_NA2C
trialConcurrency: 6
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: na2c.py
... | 611 | 25.608696 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K1024M4096/config_opevo.yml | authorName: default
experimentName: MatMul_N512K1024M4096_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: opevo.py
... | 676 | 25.038462 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K4096M1024/config_gbfs.yml | authorName: default
experimentName: MatMul_N512K4096M1024_GBFS
trialConcurrency: 5
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: gbfs.py
... | 630 | 25.291667 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K4096M1024/config_na2c.yml | authorName: default
experimentName: MatMul_N512K4096M1024_NA2C
trialConcurrency: 6
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: na2c.py
... | 611 | 25.608696 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/experiments/mm/N512K4096M1024/config_opevo.yml | authorName: default
experimentName: MatMul_N512K4096M1024_OPEVO
trialConcurrency: 8
maxExecDuration: 24h
maxTrialNum: 512
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
tuner:
codeDir: /root/algorithms/
classFileName: opevo.py
... | 676 | 25.038462 | 71 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/templates/batch_matmul.py | import numpy as np
import tvm
import logging
import sys, time, subprocess
from tvm import autotvm
import topi
import json
from topi.util import get_const_tuple
import os
op_attributes = {
"B": int(os.environ['B']) if 'B' in os.environ else 6,
"N": int(os.environ['N']) if 'N' in os.environ else 1024,
"K": int(os... | 3,969 | 32.083333 | 67 | py |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/templates/convfwd_direct.py | import numpy as np
import tvm
import logging
import sys, time, subprocess
from tvm import autotvm
import topi
import json
from topi.util import get_const_tuple
import os
op_attributes = {
"N": int(os.environ['N']) if 'N' in os.environ else 64,
"C": int(os.environ['C']) if 'C' in os.environ else 3,
"H": int(os.e... | 4,655 | 34.541985 | 92 | py |
nni | nni-master/examples/trials/systems_auto_tuning/opevo/src/templates/matmul.py | import numpy as np
import tvm
import logging
import sys, time, subprocess
from tvm import autotvm
import topi
import json
from topi.util import get_const_tuple
import os
op_attributes = {
"N": int(os.environ['N']) if 'N' in os.environ else 1024,
"K": int(os.environ['K']) if 'K' in os.environ else 64,
"M": int(o... | 3,648 | 31.580357 | 71 | py |
nni | nni-master/examples/trials/systems_auto_tuning/rocksdb-fillrandom/config_smac.yml | experimentName: auto_rocksdb_SMAC
searchSpaceFile: search_space.json
trialCommand: python3 main.py
trialCodeDirectory: .
trialGpuNumber: 0
trialConcurrency: 1
maxExperimentDuration: 24h
maxTrialNumber: 256
tuner:
name: SMAC
classArgs:
optimize_mode: maximize
trainingService:
platform: local
useActiveGpu: Fa... | 324 | 19.3125 | 34 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/rocksdb-fillrandom/config_tpe.yml | experimentName: auto_rocksdb_TPE
searchSpaceFile: search_space.json
trialCommand: python3 main.py
trialCodeDirectory: .
trialGpuNumber: 0
trialConcurrency: 1
maxExperimentDuration: 24h
maxTrialNumber: 256
tuner:
name: TPE
classArgs:
optimize_mode: maximize
trainingService:
platform: local
useActiveGpu: Fals... | 322 | 19.1875 | 34 | yml |
nni | nni-master/examples/trials/systems_auto_tuning/rocksdb-fillrandom/db_bench_installation.sh | #!/bin/bash
# Install db_bench and its dependencies on Ubuntu
pushd $PWD 1>/dev/null
# install snappy
echo "****************** Installing snappy *******************"
sudo apt-get install libsnappy-dev -y
# install gflag
echo "****************** Installing gflag ********************"
cd /tmp
git clone https://github.... | 975 | 25.378378 | 84 | sh |
nni | nni-master/examples/trials/systems_auto_tuning/rocksdb-fillrandom/main.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 3,345 | 33.494845 | 128 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/attention.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 6,471 | 36.627907 | 100 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/config_remote.yml | authorName: default
experimentName: ga_squad_weight_sharing
trialConcurrency: 2
maxExecDuration: 1h
maxTrialNum: 200
#choice: local, remote, pai
trainingServicePlatform: remote
#choice: true, false
useAnnotation: false
multiThread: true
tuner:
codeDir: ../../../tuners/weight_sharing/ga_customer_tuner
classFileName:... | 841 | 25.3125 | 169 | yml |
nni | nni-master/examples/trials/weight_sharing/ga_squad/data.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 8,976 | 32.496269 | 100 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/download.sh | #!/bin/bash
wget https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v1.1.json
wget https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v1.1.json
wget http://nlp.stanford.edu/data/glove.840B.300d.zip
unzip glove.840B.300d.zip | 234 | 38.166667 | 71 | sh |
nni | nni-master/examples/trials/weight_sharing/ga_squad/evaluate.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 6,044 | 33.542857 | 100 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/graph.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 12,353 | 35.658754 | 173 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/graph_to_tf.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 14,283 | 40.644315 | 100 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/rnn.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 4,291 | 35.067227 | 100 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/train_model.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 11,988 | 44.412879 | 100 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/trial.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights t... | 17,543 | 37.222222 | 185 | py |
nni | nni-master/examples/trials/weight_sharing/ga_squad/util.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights t... | 2,157 | 27.025974 | 100 | py |
nni | nni-master/examples/tuners/customized_tuner/README.md | # How to install this customized tuner as a builtin tuner
Reference [this document](https://github.com/microsoft/nni/blob/master/docs/en_US/Tuner/InstallCustomizedTuner.md) to install this customized tuner as a builtin tuner. | 226 | 74.666667 | 167 | md |
nni | nni-master/examples/tuners/customized_tuner/README_zh_CN.md | # 如何将自定义的 Tuner 安装为内置 Tuner
参考[文档](https://github.com/microsoft/nni/blob/master/docs/zh_CN/Tuner/InstallCustomizedTuner.md), 安装自定义 Tuner。 | 138 | 45.333333 | 109 | md |
nni | nni-master/examples/tuners/customized_tuner/meta_file.yml | algoType: tuner
builtinName: demotuner
className: demo_tuner.DemoTuner
classArgsValidator: demo_tuner.MyClassArgsValidator
| 123 | 23.8 | 51 | yml |
nni | nni-master/examples/tuners/customized_tuner/setup.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import setuptools
setuptools.setup(
name = 'demo-tuner',
version = '0.1',
packages = setuptools.find_packages(exclude=['*test*']),
python_requires = '>=3.6',
classifiers = [
'Programming Language :: Python :: 3',
... | 621 | 26.043478 | 72 | py |
nni | nni-master/examples/tuners/customized_tuner/demo_tuner/__init__.py | from .demo_tuner import DemoTuner, MyClassArgsValidator
| 56 | 27.5 | 55 | py |
nni | nni-master/examples/tuners/customized_tuner/demo_tuner/demo_tuner.py | import random
import numpy as np
from nni.tuner import Tuner
from nni.utils import ClassArgsValidator
class DemoTuner(Tuner):
def __init__(self, optimize_mode='maximize'):
# optimize_mode is used to demo how to create ClassArgsValidator
self.optimize_mode = optimize_mode
def update_search_spac... | 1,328 | 35.916667 | 92 | py |
nni | nni-master/examples/tuners/ga_customer_tuner/README.md | # How to use ga_customer_tuner?
This tuner is a customized tuner which only suitable for trial whose code path is "~/nni/examples/trials/ga_squad",
type `cd ~/nni/examples/trials/ga_squad` and check readme.md to get more information for ga_squad trial.
# config
If you want to use ga_customer_tuner in your experiment, ... | 537 | 32.625 | 115 | md |
nni | nni-master/examples/tuners/ga_customer_tuner/README_zh_CN.md | # 如何使用 ga_customer_tuner?
此定制的 Tuner 仅适用于代码 "~/nni/examples/trials/ga_squad",输入 `cd ~/nni/examples/trials/ga_squad` 查看 readme.md 来了解 ga_squad 的更多信息。
# 配置
如果要在 Experiment 中使用 ga_customer_tuner 可按照下列格式来配置:
tuner:
codeDir: ~/nni/examples/tuners/ga_customer_tuner
classFileName: customer_tuner.py
c... | 392 | 27.071429 | 122 | md |
nni | nni-master/examples/tuners/ga_customer_tuner/__init__.py | 0 | 0 | 0 | py | |
nni | nni-master/examples/tuners/ga_customer_tuner/customer_tuner.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 5,236 | 36.407143 | 144 | py |
nni | nni-master/examples/tuners/ga_customer_tuner/graph.py | # -*- coding: utf-8 -*-
import copy
import json
import random
from enum import Enum, unique
@unique
class LayerType(Enum):
attention = 0
self_attention = 1
rnn = 2
input = 3
output = 4
class Layer(object):
def __init__(self, type, input=None, output=None, size=None):
self.input = inpu... | 8,772 | 35.554167 | 144 | py |
nni | nni-master/examples/tuners/mnist_keras_customized_advisor/config.yml | authorName: default
experimentName: example_customized_advisor
trialConcurrency: 4
maxExecDuration: 1h
maxTrialNum: 200
#choice: local, remote, pai
trainingServicePlatform: local
searchSpacePath: search_space.json
#choice: true, false
useAnnotation: false
advisor:
codeDir: .
classFileName: dummy_advisor.py
classN... | 470 | 21.428571 | 77 | yml |
nni | nni-master/examples/tuners/mnist_keras_customized_advisor/dummy_advisor.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 4,613 | 47.0625 | 128 | py |
nni | nni-master/examples/tuners/mnist_keras_customized_advisor/mnist_keras.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 4,887 | 34.42029 | 128 | py |
nni | nni-master/examples/tuners/random_nas_tuner/random_nas_tuner.py | import numpy as np
from nni.tuner import Tuner
def random_archi_generator(nas_ss, random_state):
'''random
'''
chosen_arch = {}
for key, val in nas_ss.items():
assert val['_type'] in ['layer_choice', 'input_choice'], \
"Random NAS Tuner only receives NAS search space whose _type i... | 1,734 | 30.545455 | 109 | py |
nni | nni-master/examples/tuners/weight_sharing/ga_customer_tuner/README.md | # How to use ga_customer_tuner?
This tuner is a customized tuner which only suitable for trial whose code path is "~/nni/examples/trials/ga_squad",
type `cd ~/nni/examples/trials/ga_squad` and check readme.md to get more information for ga_squad trial.
# config
If you want to use ga_customer_tuner in your experiment, ... | 537 | 32.625 | 115 | md |
nni | nni-master/examples/tuners/weight_sharing/ga_customer_tuner/README_zh_CN.md | # 如何使用 ga_customer_tuner?
此定制的 Tuner 仅适用于代码 "~/nni/examples/trials/ga_squad",输入 `cd ~/nni/examples/trials/ga_squad` 查看 readme.md 来了解 ga_squad 的更多信息。
# 配置
如果要在 Experiment 中使用 ga_customer_tuner 可按照下列格式来配置:
tuner:
codeDir: ~/nni/examples/tuners/ga_customer_tuner
classFileName: customer_tuner.py
c... | 392 | 27.071429 | 122 | md |
nni | nni-master/examples/tuners/weight_sharing/ga_customer_tuner/__init__.py | 0 | 0 | 0 | py | |
nni | nni-master/examples/tuners/weight_sharing/ga_customer_tuner/customer_tuner.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to ... | 9,258 | 39.969027 | 140 | py |
nni | nni-master/examples/tuners/weight_sharing/ga_customer_tuner/graph.py | # Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated
# documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights... | 12,353 | 35.658754 | 173 | py |
nni | nni-master/examples/tutorials/darts.py | """
Searching in DARTS search space
===============================
In this tutorial, we demonstrate how to search in the famous model space proposed in `DARTS`_.
Through this process, you will learn:
* How to use the built-in model spaces from NNI's model space hub.
* How to use one-shot exploration strategies to e... | 27,483 | 37.013831 | 136 | py |
nni | nni-master/examples/tutorials/hello_nas.py | """
Hello, NAS!
===========
This is the 101 tutorial of Neural Architecture Search (NAS) on NNI.
In this tutorial, we will search for a neural architecture on MNIST dataset with the help of NAS framework of NNI, i.e., *Retiarii*.
We use multi-trial NAS as an example to show how to construct and explore a model space.
... | 13,690 | 38.684058 | 138 | py |
nni | nni-master/examples/tutorials/nasbench_as_dataset.py | """
Use NAS Benchmarks as Datasets
==============================
In this tutorial, we show how to use NAS Benchmarks as datasets.
For research purposes we sometimes desire to query the benchmarks for architecture accuracies,
rather than train them one by one from scratch.
NNI has provided query tools so that users ca... | 5,557 | 28.88172 | 123 | py |
nni | nni-master/examples/tutorials/new_pruning_bert_glue.py | """
Pruning Bert on Task MNLI
=========================
This is a new tutorial on pruning transformer in nni v3.0 (`old tutorial <https://nni.readthedocs.io/en/v2.9/tutorials/pruning_bert_glue.html>`__).
The main difference between this tutorial and the previous is that it integrates the feature of fusion compression ... | 23,836 | 37.571197 | 169 | py |
nni | nni-master/examples/tutorials/pruning_quick_start.py | """
Pruning Quickstart
==================
Model pruning is a technique to reduce the model size and computation by reducing model weight size or intermediate state size.
There are three common practices for pruning a DNN model:
#. Pre-training a model -> Pruning the model -> Fine-tuning the pruned model
#. Pruning a ... | 3,639 | 32.703704 | 128 | py |
nni | nni-master/examples/tutorials/pruning_speedup.py | """
Speedup Model with Mask
========================
Introduction
------------
Pruning algorithms usually use weight masks to simulate the real pruning. Masks can be used
to check model performance of a specific pruning (or sparsity), but there is no real speedup.
Since model speedup is the ultimate goal of model pru... | 6,827 | 27.569038 | 153 | py |
nni | nni-master/examples/tutorials/quantization_bert_glue.py | """
Quantize BERT on Task GLUE
==========================
Here we show an effective transformer simulated quantization process that NNI team has tried, and users can use NNI to discover better process.
We use the BERT model and the trainer pipeline in the Transformers to do some experiments.
The entire quantization p... | 11,273 | 36.832215 | 163 | py |
nni | nni-master/examples/tutorials/quantization_quick_start.py | """
Quantization Quickstart
=======================
Quantization reduces model size and speeds up inference time by reducing the number of bits required to represent weights or activations.
In NNI, both post-training quantization algorithms and quantization-aware training algorithms are supported.
Here we use `QATQua... | 5,582 | 31.649123 | 137 | py |