python_code stringlengths 0 679k | repo_name stringlengths 9 41 | file_path stringlengths 6 149 |
|---|---|---|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/tc.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/misc.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/prof.py |
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Aditya Agrawal.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | PyProf-master | pyprof/prof/memory.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/reduction.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/embedding.py |
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Aditya Agrawal.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | PyProf-master | pyprof/prof/dtype.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/linear.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/convert.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/utility.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/pooling.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/__init__.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/randomSample.py |
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Aditya Agrawal.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | PyProf-master | pyprof/prof/tensor.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/loss.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/activation.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/blas.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/index_slice_join_mutate.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/pointwise.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/dropout.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/conv.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/recurrentCell.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/normalization.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/optim.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/usage.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/softmax.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/__main__.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/base.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/data.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/prof/output.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/lenet.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/operators.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/simple.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/custom_func_module/custom_module.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/custom_func_module/custom_function.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/jit/jit_trace_function.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/jit/jit_trace_method.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/jit/jit_script_function.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/jit/jit_script_method.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/imagenet/imagenet.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/examples/user_annotation/resnet.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/nvtx/config.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/nvtx/dlprof.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/nvtx/__init__.py |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | PyProf-master | pyprof/nvtx/nvmarker.py |
"""
A script to convert the csv file output into two kinds of graphs:
1, Graphs of each hyperparameter with the benchmark (e.g. valid perplexity)
2, Color graphs that show the relationship between any two hyperparameters and the benchmark
To run the script, use:
python3 visualize.py --file [the name of the results cs... | Milano-master | visualize.py |
# Copyright (c) 2018 NVIDIA Corporation
import argparse
import runpy
from milano.exec_utils import ExecutionManager
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Tuning parameters')
parser.add_argument("--config", required=True,
help="Path to the configuration file... | Milano-master | tune.py |
# Copyright (c) 2018 NVIDIA Corporation
import asyncio
import numpy as np
import pandas as pd
import re
import traceback
from typing import Iterable, Mapping, Any, Tuple, Optional
from .backends.base import Backend, JobStatus, RetrievingJobLogsError, \
IsWorkerAvailableError, GettingJobStatu... | Milano-master | milano/exec_utils.py |
# Copyright (c) 2018 NVIDIA Corporation | Milano-master | milano/__init__.py |
# Copyright (c) 2018 NVIDIA Corporation
import subprocess
import json
import os
import shutil
import copy
import time
import re
from .utils import SSHClient
from .base import Backend, JobStatus, RetrievingJobLogsError, \
GettingJobStatusError, KillingJobError, \
IsWorkerAvailableErr... | Milano-master | milano/backends/slurm.py |
# Copyright (c) 2018 NVIDIA Corporation
import boto3
import botocore
import time
import threading
import json
import hashlib
from milano.backends.utils import SSHClient
class EC2Instance:
def __init__(self, resource, username, private_key_path):
self._resource = resource
self._private_key_path = private_key... | Milano-master | milano/backends/aws_utils.py |
# Copyright (c) 2018 NVIDIA Corporation
from .base import Backend, JobStatus, RetrievingJobLogsError, KillingJobError, \
IsWorkerAvailableError, GettingJobStatusError, \
LaunchingJobError
from .azkaban_utils import AzkabanManager, commands_to_job, \
strings... | Milano-master | milano/backends/azkaban.py |
# Copyright (c) 2018 NVIDIA Corporation
from .azkaban import AzkabanBackend
from .aws import AWSBackend
from .slurm import SLURMBackend
| Milano-master | milano/backends/__init__.py |
# Copyright (c) 2018 NVIDIA Corporation
import requests
import io
import zipfile
from typing import Iterable, Tuple, Sequence
class AzkabanConnectionError(Exception):
"""An exception that is going to be raised if something fails
with Azkaban access.
"""
def __init__(self, message):
self.message = message... | Milano-master | milano/backends/azkaban_utils.py |
# Copyright (c) 2018 NVIDIA Corporation
from .aws_utils import EC2InstanceManager
from .base import Backend, JobStatus, RetrievingJobLogsError, \
GettingJobStatusError, KillingJobError, \
IsWorkerAvailableError, LaunchingJobError
class AWSJob:
def __init__(self, worker, containe... | Milano-master | milano/backends/aws.py |
# Copyright (c) 2018 NVIDIA Corporation
import paramiko
import time
class RemoteCommand:
"""Represents a command run via ssh"""
def __init__(self, channel):
self._channel = channel
self._stdout_buffer = ""
self._stderr_buffer = ""
self._exit_code = None
def is_running(self):
return self._exi... | Milano-master | milano/backends/utils.py |
# Copyright (c) 2018 NVIDIA Corporation
"""
This module contains base Backend class and a number of exceptions that
backends can raise.
When defining new backends you must inherit from Backend class. Since it is
important for backend to be failure-safe, we define a number of "safe"
exceptions here which all inherit fr... | Milano-master | milano/backends/base.py |
# Copyright (c) 2017 NVIDIA Corporation
from .random_search import RandomSearch
from .gp.gp_search import GPSearch
| Milano-master | milano/search_algorithms/__init__.py |
# Copyright (c) 2017 NVIDIA Corporation
import numpy as np
from typing import Iterable, Mapping, Optional
from .base import SearchAlgorithm
class RandomSearch(SearchAlgorithm):
def _sample_params(self) -> Mapping:
"""Generates new parameters by random sampling."""
sampled_params = {}
for pm_name, pm_dic... | Milano-master | milano/search_algorithms/random_search.py |
# Copyright (c) 2017 NVIDIA Corporation
import abc
import six
import numpy as np
from typing import Iterable, Mapping, Optional
@six.add_metaclass(abc.ABCMeta)
class SearchAlgorithm:
"""All search algorithms in MLQuest must inherit from this."""
def __init__(self,
params_to_tune: Mapping,
... | Milano-master | milano/search_algorithms/base.py |
Milano-master | milano/search_algorithms/gp/__init__.py | |
# Copyright (c) 2017 NVIDIA Corporation
# This is wrapper around spearmint library. Please note that it imports code licensed under GPL v3.
import numpy as np
import collections
from typing import Iterable, Mapping, Optional
from milano.search_algorithms.base import SearchAlgorithm
from milano.search_algorithms.gp.sp... | Milano-master | milano/search_algorithms/gp/gp_search.py |
# This code was modified to be compatible with NVAML project
import math
from numpy import *
def i4_bit_hi1 ( n ):
#*****************************************************************************80
#
## I4_BIT_HI1 returns the position of the high 1 bit base 2 in an integer.
#
# Example:
#
# N Binary BIT
# ... | Milano-master | milano/search_algorithms/gp/spearmint/sobol_lib.py |
##
# Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams
#
# This code is written for research and educational purposes only to
# supplement the paper entitled
# "Practical Bayesian Optimization of Machine Learning Algorithms"
# by Snoek, Larochelle and Adams
# Advances in Neural Information Processing S... | Milano-master | milano/search_algorithms/gp/spearmint/gpei_chooser.py |
##
# Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams
#
# This code is written for research and educational purposes only to
# supplement the paper entitled
# "Practical Bayesian Optimization of Machine Learning Algorithms"
# by Snoek, Larochelle and Adams
# Advances in Neural Information Processing... | Milano-master | milano/search_algorithms/gp/spearmint/gp.py |
##
# Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams
#
# This code is written for research and educational purposes only to
# supplement the paper entitled
# "Practical Bayesian Optimization of Machine Learning Algorithms"
# by Snoek, Larochelle and Adams
# Advances in Neural Information Processing S... | Milano-master | milano/search_algorithms/gp/spearmint/gpeiopt_chooser.py |
Milano-master | milano/search_algorithms/gp/spearmint/__init__.py | |
# ##
# # Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams
# #
# # This code is written for research and educational purposes only to
# # supplement the paper entitled "Practical Bayesian Optimization of
# # Machine Learning Algorithms" by Snoek, Larochelle and Adams Advances
# # in Neural Information ... | Milano-master | milano/search_algorithms/gp/spearmint/utils.py |
##
# Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams
#
# This code is written for research and educational purposes only to
# supplement the paper entitled
# "Practical Bayesian Optimization of Machine Learning Algorithms"
# by Snoek, Larochelle and Adams
# Advances in Neural Information Processing S... | Milano-master | milano/search_algorithms/gp/spearmint/gpei_constrained_chooser.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.backends import AzkabanBackend
from milano.search_algorithms import RandomSearch
# specify path to the script that is going to be tuned
# path has to be absolute or relative to tune.py script
script_to_run = "examples/os2s/cifar10/start_azk.sh"
params_to_try_first ... | Milano-master | examples/os2s/cifar10/cifar10_azkaban.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.backends import SLURMBackend
from milano.search_algorithms import RandomSearch
# specify path to the script that is going to be tuned
# path has to be absolute or relative to tune.py script
script_to_run = "examples/os2s/cifar10/start_slurm.sh"
# specify the tunable... | Milano-master | examples/os2s/cifar10/cifar10_slurm.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.backends import AWSBackend
from milano.search_algorithms import RandomSearch
# specify path to the script that is going to be tuned
# path has to be absolute or relative to tune.py script
script_to_run = "examples/os2s/cifar10/start_aws.sh"
# specify the tunable pa... | Milano-master | examples/os2s/cifar10/cifar10_aws.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.backends import SLURMBackend
from milano.search_algorithms import RandomSearch
# specify path to the script that is going to be tuned
# path has to be absolute or relative to tune.py script
# this should be on a driver machine
script_to_run = "examples/pytorch/wlm/st... | Milano-master | examples/pytorch/wlm/wlm_slurm.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.backends import AzkabanBackend
from milano.search_algorithms import RandomSearch
# specify path to the script that is going to be tuned
# path has to be absolute or relative to tune.py script
# this should be on a driver machine
script_to_run = "examples/pytorch/wlm/... | Milano-master | examples/pytorch/wlm/wlm_azkaban.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.backends import AWSBackend
from milano.search_algorithms import RandomSearch
# specify path to the script that is going to be tuned
# path has to be absolute or relative to tune.py script
script_to_run = "examples/pytorch/wlm/start_wlm_aws.sh"
# These configuration... | Milano-master | examples/pytorch/wlm/wlm_aws.py |
# Copyright (c) 2018 NVIDIA Corporation
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import os
import argparse
def build_images(results_dir, img_format="png"):
num_steps = 100
results_dict = {}
for bench_dir in os.listdir(os.path.join(results_dir, 'results_csvs')):
bench = bench_d... | Milano-master | benchmarking/build_images.py |
# Copyright (c) 2018 NVIDIA Corporation
import argparse
import runpy
import os
import sys
import pandas as pd
sys.path.insert(0, "../")
from milano.exec_utils import ExecutionManager
from milano.backends import AzkabanBackend
def gen_bench_funcs(bench_type):
funcs_dict = {
"bbob": (prepare_bbob, finalize_bbob)... | Milano-master | benchmarking/benchmark_algo.py |
# Copyright (c) 2018 NVIDIA Corporation
#!/usr/bin/env python
from __future__ import print_function
import numpy as np
import inspect
import sys
class BenchmarkGenerator:
def __init__(self, random_seed=None, dim=1):
if random_seed is not None:
np.random.seed(random_seed)
self._dim = dim
def _gen_xo... | Milano-master | benchmarking/bbob_func_eval.py |
# Copyright (c) 2018 NVIDIA Corporation
import os
import argparse
import subprocess
import sys
from build_images import build_images
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--configs_dir', default="benchmarking_configs",
help='Directory with all be... | Milano-master | benchmarking/run_benchmarks.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.search_algorithms import RandomSearch
# Note that this config the same as random_search.py
# This is intentional and additional steps are automatically
# added by full_benchmark.py
search_algorithm = RandomSearch
search_algorithm_params = {}
| Milano-master | benchmarking/benchmarking_configs/2x_random_search.py |
# Copyright (c) 2018 NVIDIA Corporation
from milano.search_algorithms import RandomSearch
# For benchmarks only search algorithm need to be specified.
# Optionally you can also specify a custom backend.
# If not specified, AzkabanBackend with default parameters and
# 10 identical workers will be used.
search_algorith... | Milano-master | benchmarking/benchmarking_configs/random_search.py |
#!/usr/bin/python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import subprocess
import os
import os.path
import sys
import re
from optparse import OptionParser
VERBOSE = False
JS_FILES = [
"../t... | tdl-master | build/build.py |
#!/usr/bin/python3
# SPDX-License-Identifier: BSD-2-Clause-Patent
import os
import sys
import json
import shutil
import pprint
import argparse
import subprocess
def openssl_configure(openssldir, target, ec = True):
""" Run openssl Configure script. """
cmdline = [
'perl',
'Configure',
'... | edk2-master | CryptoPkg/Library/OpensslLib/configure.py |
# @file Edk2ToolsBuild.py
# Invocable class that builds the basetool c files.
#
# Supports VS2017, VS2019, and GCC5
##
# Copyright (c) Microsoft Corporation
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
import logging
import argparse
import multiprocessing
from edk2toolext import edk2_logging... | edk2-master | BaseTools/Edk2ToolsBuild.py |
## @file
#
#
# Copyright (c) 2009 - 2014, Apple Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
import sys
import locale
if sys.platform == "darwin" and sys.version_info[0] < 3:
DefaultLocal = locale.getdefaultlocale()[1]
if DefaultLocal is None:
DefaultLocal = 'UTF8'
sys.setde... | edk2-master | BaseTools/Source/Python/sitecustomize.py |
## @file
# generate capsule
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from .GenFdsGlobalVariable import GenFdsGlobalVariable, FindExtendTool
from CommonDataClass.FdfClass i... | edk2-master | BaseTools/Source/Python/GenFds/Capsule.py |
## @file
# process FFS generation
#
# Copyright (c) 2007-2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from Common.DataType import *
# mapping between FILE type in FDF and file type for GenFfs
FdfFvFileTypeToFileType = {
SUP_MODULE_SEC... | edk2-master | BaseTools/Source/Python/GenFds/Ffs.py |
## @file
# process depex section generation
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from . import Section
from .GenFdsGlobalVariable import GenFdsGlobalVariable
import Co... | edk2-master | BaseTools/Source/Python/GenFds/DepexSection.py |
## @file
# generate capsule
#
# Copyright (c) 2007-2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from .GenFdsGlobalVariable import GenFdsGlobalVariable
from io import BytesIO
from struct import pack
im... | edk2-master | BaseTools/Source/Python/GenFds/CapsuleData.py |
## @file
# process compress section generation
#
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from .Ffs import SectionSuffix
from . import Section
import subprocess
import Commo... | edk2-master | BaseTools/Source/Python/GenFds/CompressSection.py |
## @file
# process FD Region generation
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from struct import *
from .GenFdsGlobalVariable import GenFdsGlobalVariable
from io import... | edk2-master | BaseTools/Source/Python/GenFds/Region.py |
## @file
# process FV image section generation
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from . import Section
from io import BytesIO
from .Ffs import SectionSuffix
import ... | edk2-master | BaseTools/Source/Python/GenFds/FvImageSection.py |
## @file
# process OptionROM generation
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.LongFilePathOs as os
import subprocess
from . import OptRomInfStatement
fro... | edk2-master | BaseTools/Source/Python/GenFds/OptionRom.py |
## @file
# parse FDF file
#
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import print_function
from __future__ import absolute_i... | edk2-master | BaseTools/Source/Python/GenFds/FdfParser.py |
## @file
# Python 'GenFds' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/GenFds/__init__.py |
## @file
# Complex Rule object for generating FFS
#
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from . import Rule
from CommonDataClass.FdfClass import RuleComplexFileClassObject
##... | edk2-master | BaseTools/Source/Python/GenFds/RuleComplexFile.py |
## @file
# process GUIDed section generation
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from . import... | edk2-master | BaseTools/Source/Python/GenFds/GuidSection.py |
## @file
# process FFS generation from FILE statement
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from io import BytesIO
from struct import pack
from CommonDataClass.FdfClass... | edk2-master | BaseTools/Source/Python/GenFds/FfsFileStatement.py |
## @file
# process UI section generation
#
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from . import Section
from .Ffs import SectionSuffix
import subprocess
import Common.Long... | edk2-master | BaseTools/Source/Python/GenFds/UiSection.py |
## @file
# section base class
#
# Copyright (c) 2007-2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from CommonDataClass.FdfClass import SectionClassObject
from .GenFdsGlobalVariable import GenFdsGlobal... | edk2-master | BaseTools/Source/Python/GenFds/Section.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.