diff --git a/__init__.py b/__init__.py index e69de29..9a04545 100644 --- a/__init__.py +++ b/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. diff --git a/petridish/__init__.py b/petridish/__init__.py index e69de29..9a04545 100644 --- a/petridish/__init__.py +++ b/petridish/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. diff --git a/petridish/analysis/model.py b/petridish/analysis/model.py index e1a3c0f..36bf581 100644 --- a/petridish/analysis/model.py +++ b/petridish/analysis/model.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + """ This script is gathers information about a model training run using the log file of the run (or the saved stdout of the run). diff --git a/petridish/analysis/model_philly.py b/petridish/analysis/model_philly.py index 7e5a4e9..390da1c 100644 --- a/petridish/analysis/model_philly.py +++ b/petridish/analysis/model_philly.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import argparse import os, sys, re import numpy as np diff --git a/petridish/analysis/model_util.py b/petridish/analysis/model_util.py index 337d4b9..ef3516c 100644 --- a/petridish/analysis/model_util.py +++ b/petridish/analysis/model_util.py @@ -1,3 +1,5 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. import re import sys diff --git a/petridish/analysis/philly_util.py b/petridish/analysis/philly_util.py index c9830fc..7d3605b 100644 --- a/petridish/analysis/philly_util.py +++ b/petridish/analysis/philly_util.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + """ This util handles special file system structures related to philly. """ diff --git a/petridish/analysis/search.py b/petridish/analysis/search.py index b070c00..3e58d02 100644 --- a/petridish/analysis/search.py +++ b/petridish/analysis/search.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + """ This script inspects a log.log file of a search in order to extract the model architecture files for final training. diff --git a/petridish/analysis/search_philly.py b/petridish/analysis/search_philly.py index 4776aa6..33de4ea 100644 --- a/petridish/analysis/search_philly.py +++ b/petridish/analysis/search_philly.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + """ This script inspects a log.log file of a search in order to extract the model architecture files for final training. diff --git a/petridish/analysis/search_util.py b/petridish/analysis/search_util.py index 96eccbc..220cccc 100644 --- a/petridish/analysis/search_util.py +++ b/petridish/analysis/search_util.py @@ -1,4 +1,5 @@ - +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. import numpy as np import json diff --git a/petridish/app/__init__.py b/petridish/app/__init__.py index 0fce5cf..3c4116d 100644 --- a/petridish/app/__init__.py +++ b/petridish/app/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + # This module contains the python script entries of the petridish. # 1. the server handles search logics such as which to expand, # and which to train and evaluate. The critic for evaluating models diff --git a/petridish/app/directory.py b/petridish/app/directory.py index f69080d..032743e 100644 --- a/petridish/app/directory.py +++ b/petridish/app/directory.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import os import glob import re diff --git a/petridish/app/local_crawler.py b/petridish/app/local_crawler.py index d9df7f6..2c3534c 100644 --- a/petridish/app/local_crawler.py +++ b/petridish/app/local_crawler.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import os import re import subprocess diff --git a/petridish/app/multi_proc.py b/petridish/app/multi_proc.py index 12c3c85..ef808d3 100644 --- a/petridish/app/multi_proc.py +++ b/petridish/app/multi_proc.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import zmq import sys, os import time diff --git a/petridish/app/options.py b/petridish/app/options.py index 590e28d..1fbf589 100644 --- a/petridish/app/options.py +++ b/petridish/app/options.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import argparse import numpy as np import os diff --git a/petridish/app/petridish_main.py b/petridish/app/petridish_main.py index 9af324c..d41d7b5 100644 --- a/petridish/app/petridish_main.py +++ b/petridish/app/petridish_main.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + """ The actors: Server, Sleeper, Remote, Crawler. diff --git a/petridish/cust_exps_gen/__init__.py b/petridish/cust_exps_gen/__init__.py index e69de29..9a04545 100644 --- a/petridish/cust_exps_gen/__init__.py +++ b/petridish/cust_exps_gen/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. diff --git a/petridish/cust_exps_gen/generate_train_script.py b/petridish/cust_exps_gen/generate_train_script.py index 94d0009..f8da7a6 100644 --- a/petridish/cust_exps_gen/generate_train_script.py +++ b/petridish/cust_exps_gen/generate_train_script.py @@ -1,3 +1,7 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + + """ This script generate a training script given a net_info stored in a single line in a text file, diff --git a/petridish/cust_exps_gen/util.py b/petridish/cust_exps_gen/util.py index 3a90e00..8d03fcd 100644 --- a/petridish/cust_exps_gen/util.py +++ b/petridish/cust_exps_gen/util.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import argparse import itertools import copy diff --git a/petridish/data/__init__.py b/petridish/data/__init__.py index e69de29..9a04545 100644 --- a/petridish/data/__init__.py +++ b/petridish/data/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. diff --git a/petridish/data/cifar.py b/petridish/data/cifar.py index 1ae0e10..00f8262 100644 --- a/petridish/data/cifar.py +++ b/petridish/data/cifar.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import multiprocessing diff --git a/petridish/data/downsampled_imagenet.py b/petridish/data/downsampled_imagenet.py index a88eb75..5d1dfc2 100644 --- a/petridish/data/downsampled_imagenet.py +++ b/petridish/data/downsampled_imagenet.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import os import re diff --git a/petridish/data/imagenet.py b/petridish/data/imagenet.py index d0a7925..ddb5099 100644 --- a/petridish/data/imagenet.py +++ b/petridish/data/imagenet.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import os import cv2 diff --git a/petridish/data/inat.py b/petridish/data/inat.py index e752c86..3213556 100644 --- a/petridish/data/inat.py +++ b/petridish/data/inat.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import os import cv2 diff --git a/petridish/data/misc.py b/petridish/data/misc.py index ebc14f4..7d03000 100644 --- a/petridish/data/misc.py +++ b/petridish/data/misc.py @@ -1,3 +1,5 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. import numpy as np import scipy.io.arff as arff diff --git a/petridish/data/openml.py b/petridish/data/openml.py index 302af7a..278fc15 100644 --- a/petridish/data/openml.py +++ b/petridish/data/openml.py @@ -1,3 +1,5 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. import numpy as np import scipy.io.arff as arff diff --git a/petridish/data/ptb/__init__.py b/petridish/data/ptb/__init__.py index d789f52..cfe4016 100644 --- a/petridish/data/ptb/__init__.py +++ b/petridish/data/ptb/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + from petridish.data.ptb.ptb_tf import ( _read_words, _build_vocab, _file_to_word_ids ) diff --git a/petridish/data/ptb/ptb.py b/petridish/data/ptb/ptb.py index d77d89c..483ed35 100644 --- a/petridish/data/ptb/ptb.py +++ b/petridish/data/ptb/ptb.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import os from tensorpack.dataflow import DataFlow diff --git a/petridish/data/ptb/ptb_train_eval_helper.py b/petridish/data/ptb/ptb_train_eval_helper.py index cbddf8c..b0dd4ea 100644 --- a/petridish/data/ptb/ptb_train_eval_helper.py +++ b/petridish/data/ptb/ptb_train_eval_helper.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np from petridish.data.ptb import PennTreeBankDataFlow from petridish.utils.callbacks import (PerStepHookWithControlDependencies, diff --git a/petridish/data/speech_commands.py b/petridish/data/speech_commands.py index 0bef704..a62cf2e 100644 --- a/petridish/data/speech_commands.py +++ b/petridish/data/speech_commands.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import os import re diff --git a/petridish/data/tiny_imagenet.py b/petridish/data/tiny_imagenet.py index 0aed45f..3a85292 100644 --- a/petridish/data/tiny_imagenet.py +++ b/petridish/data/tiny_imagenet.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import os import cv2 diff --git a/petridish/info/__init__.py b/petridish/info/__init__.py index 0d0f6e7..102aaf7 100644 --- a/petridish/info/__init__.py +++ b/petridish/info/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + # This file contains everything that is from petridish.info.layer_info import LayerInfo, LayerTypes, LayerInfoList from petridish.info.net_info import ( diff --git a/petridish/info/layer_info.py b/petridish/info/layer_info.py index 811404c..524276e 100644 --- a/petridish/info/layer_info.py +++ b/petridish/info/layer_info.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import json import copy diff --git a/petridish/info/net_info.py b/petridish/info/net_info.py index 261e539..d86eb99 100644 --- a/petridish/info/net_info.py +++ b/petridish/info/net_info.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import json import copy diff --git a/petridish/model/__init__.py b/petridish/model/__init__.py index 721a23e..fc5c35c 100644 --- a/petridish/model/__init__.py +++ b/petridish/model/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + from petridish.model.feedforward import ( PetridishBaseCell, PetridishModel, RecognitionModel, MLPModel ) diff --git a/petridish/model/common.py b/petridish/model/common.py index a424457..4b68957 100644 --- a/petridish/model/common.py +++ b/petridish/model/common.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import tensorflow as tf diff --git a/petridish/model/droppath.py b/petridish/model/droppath.py index 6995d19..97cc692 100644 --- a/petridish/model/droppath.py +++ b/petridish/model/droppath.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import tensorflow as tf from tensorpack.tfutils.tower import get_current_tower_context from tensorpack.tfutils.common import get_global_step_var diff --git a/petridish/model/feedforward.py b/petridish/model/feedforward.py index 181e9d9..c483930 100644 --- a/petridish/model/feedforward.py +++ b/petridish/model/feedforward.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import tensorflow as tf diff --git a/petridish/model/hallu.py b/petridish/model/hallu.py index 155d3b7..3cb9104 100644 --- a/petridish/model/hallu.py +++ b/petridish/model/hallu.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import tensorflow as tf from petridish.info import LayerInfoList diff --git a/petridish/model/layer.py b/petridish/model/layer.py index b09d359..8ff4fce 100644 --- a/petridish/model/layer.py +++ b/petridish/model/layer.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import tensorflow as tf import re diff --git a/petridish/model/recurrrent.py b/petridish/model/recurrrent.py index 4e2de12..e785030 100644 --- a/petridish/model/recurrrent.py +++ b/petridish/model/recurrrent.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import tensorflow as tf diff --git a/petridish/model/train_eval.py b/petridish/model/train_eval.py index f859052..99e941b 100644 --- a/petridish/model/train_eval.py +++ b/petridish/model/train_eval.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import tensorflow as tf import os diff --git a/petridish/nas_control/__init__.py b/petridish/nas_control/__init__.py index 38d8864..e74f66a 100644 --- a/petridish/nas_control/__init__.py +++ b/petridish/nas_control/__init__.py @@ -1,4 +1,7 @@ -# This module contains logics of NAS, which includes +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + +# This module contains logic of NAS, which includes # 1. the choice of parent models to expand # 2. the choice of children/hallu models to train. # There were plan to make critics to learn to select them diff --git a/petridish/nas_control/controller.py b/petridish/nas_control/controller.py index 557252b..8a866db 100644 --- a/petridish/nas_control/controller.py +++ b/petridish/nas_control/controller.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + """ Controller holds constants regarding how the exploration/exploitation is done. It also contains the logics of these actions. diff --git a/petridish/nas_control/critic.py b/petridish/nas_control/critic.py index cb6260e..5331d14 100644 --- a/petridish/nas_control/critic.py +++ b/petridish/nas_control/critic.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import os, re import numpy as np import tensorflow as tf diff --git a/petridish/nas_control/queue.py b/petridish/nas_control/queue.py index c8c0d36..74f3294 100644 --- a/petridish/nas_control/queue.py +++ b/petridish/nas_control/queue.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + from collections import namedtuple import heapq import random diff --git a/petridish/nas_control/queue_diversity.py b/petridish/nas_control/queue_diversity.py index 5792d83..59211b3 100644 --- a/petridish/nas_control/queue_diversity.py +++ b/petridish/nas_control/queue_diversity.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import heapq diff --git a/petridish/philly/__init__.py b/petridish/philly/__init__.py index e69de29..9a04545 100644 --- a/petridish/philly/__init__.py +++ b/petridish/philly/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. diff --git a/petridish/philly/container.py b/petridish/philly/container.py index 79be364..5ec0fb4 100644 --- a/petridish/philly/container.py +++ b/petridish/philly/container.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import os import json diff --git a/petridish/philly/generator.py b/petridish/philly/generator.py index d5c868d..0f5f563 100644 --- a/petridish/philly/generator.py +++ b/petridish/philly/generator.py @@ -1,7 +1,9 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import subprocess import json - SCRIPT_TEMPLATE = \ r"""#!/bin/bash diff --git a/petridish/philly/heartbeat.py b/petridish/philly/heartbeat.py index 58105e9..1fe5467 100644 --- a/petridish/philly/heartbeat.py +++ b/petridish/philly/heartbeat.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import time from threading import Timer diff --git a/petridish/utils/__init__.py b/petridish/utils/__init__.py index e69de29..0eca642 100644 --- a/petridish/utils/__init__.py +++ b/petridish/utils/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. \ No newline at end of file diff --git a/petridish/utils/callbacks.py b/petridish/utils/callbacks.py index bf2b8ab..c41da38 100644 --- a/petridish/utils/callbacks.py +++ b/petridish/utils/callbacks.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import tensorflow as tf from tensorpack.callbacks import Callback, HookToCallback, Inferencer diff --git a/petridish/utils/geometry.py b/petridish/utils/geometry.py index d0981d5..b3d8ecc 100644 --- a/petridish/utils/geometry.py +++ b/petridish/utils/geometry.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import numpy as np import os import bisect diff --git a/petridish/utils/sample.py b/petridish/utils/sample.py index c4f2096..35ffcc0 100644 --- a/petridish/utils/sample.py +++ b/petridish/utils/sample.py @@ -1,3 +1,7 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + + import numpy as np def online_sampling(x_gen, k): diff --git a/petridish/utils/sessinit.py b/petridish/utils/sessinit.py index 5aab8af..016ddac 100644 --- a/petridish/utils/sessinit.py +++ b/petridish/utils/sessinit.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + import os import numpy as np import tensorflow as tf