From 2e0068f870bff0be723961f78ee1452534cf16ed Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 14:50:08 +0530 Subject: [PATCH 01/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f554d48..3b7302d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +[![Gitter](https://badges.gitter.im/s-atmech/community.svg)](https://gitter.im/s-atmech/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

From 86c1f9aff4bd7ee1008d8aa6cf8e0ee0f8f2e019 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 18:36:19 +0530 Subject: [PATCH 02/25] Create config.yml --- .circleci/config.yml | 166 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..3df37b0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,166 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "requirements.txt" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: + name: install dependencies + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "requirements.txt" }} + + test_nets: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: test_nets + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + python3 -m unittest tests/test_nets.py + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "test_nets.py" }} + + test_attacks: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: test_attacks + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + python3 -m unittest tests/test_attacks.py + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "test_attacks.py" }} + + test_one_calls: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: test_one_calls + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + python3 -m unittest tests/test_one_calls.py + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "tests/test_one_calls.py" }} + + test_metrics: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: test_metrics + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + python3 -m unittest tests/test_metrics.py + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "tests/test_metrics.py" }} + + test_learners: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: test_learners + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + python3 -m unittest tests/test_learners.py + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "tests/test_learners.py" }} + + test_utils: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: test_utils + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + python3 -m unittest tests/test_utils.py + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "tests/test_utils.py" }} + +workflows: + version: 2 + build_and_test: + jobs: + - build + - test_nets + - test_attacks + - test_one_calls + - test_metrics + - test_learners + - test_utils From 9f840d37f4c5d8fb6599f02cfa458aa8a3eb3333 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 18:48:36 +0530 Subject: [PATCH 03/25] Create requirements.txt --- requirements.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d3605f2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +numpy>=1.16.4 +pandas>=0.22.0 +tensorflow==2.0.0 +matplotlib>=3.1.2 +scikit-learn>=0.22 +jupyter>=1.0.0 +Pillow>=6.1.0 +nltk>=3.4.5 +pyYAML>=5.2 +scipy>=1.3.0 From 94a4f4cd1063e07a78ab572b52db014eaa5a6e33 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 18:52:18 +0530 Subject: [PATCH 04/25] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d3605f2..de9595e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ numpy>=1.16.4 pandas>=0.22.0 -tensorflow==2.0.0 +tensorflow>=1.15.0 matplotlib>=3.1.2 scikit-learn>=0.22 jupyter>=1.0.0 From 3d74aa77331e38310627a51ef2e7a7404dac8768 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 18:54:13 +0530 Subject: [PATCH 05/25] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index de9595e..ba944d5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ numpy>=1.16.4 pandas>=0.22.0 -tensorflow>=1.15.0 +tensorflow matplotlib>=3.1.2 scikit-learn>=0.22 jupyter>=1.0.0 From a9a216bba8aa5e845f1f9d5ba351aa13fe7f912a Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:02:51 +0530 Subject: [PATCH 06/25] Update config.yml --- .circleci/config.yml | 122 +++---------------------------------------- 1 file changed, 7 insertions(+), 115 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3df37b0..53ae779 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,7 +27,7 @@ jobs: - ./venv key: v1-dependencies-{{ checksum "requirements.txt" }} - test_nets: + test_layer: docker: - image: circleci/python:3.6.1 @@ -37,130 +37,22 @@ jobs: - checkout - run: - name: test_nets + name: test_layer command: | python3 -m venv venv . venv/bin/activate pip install -r requirements.txt - python3 -m unittest tests/test_nets.py + python3 -m unittest tests/test_layer.py - save_cache: paths: - ./venv - key: v1-dependencies-{{ checksum "test_nets.py" }} - - test_attacks: - docker: - - image: circleci/python:3.6.1 - - working_directory: ~/repo - - steps: - - checkout - - - run: - name: test_attacks - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - python3 -m unittest tests/test_attacks.py - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "test_attacks.py" }} - - test_one_calls: - docker: - - image: circleci/python:3.6.1 - - working_directory: ~/repo - - steps: - - checkout - - - run: - name: test_one_calls - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - python3 -m unittest tests/test_one_calls.py - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "tests/test_one_calls.py" }} - - test_metrics: - docker: - - image: circleci/python:3.6.1 - - working_directory: ~/repo - - steps: - - checkout - - - run: - name: test_metrics - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - python3 -m unittest tests/test_metrics.py - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "tests/test_metrics.py" }} - - test_learners: - docker: - - image: circleci/python:3.6.1 - - working_directory: ~/repo - - steps: - - checkout - - - run: - name: test_learners - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - python3 -m unittest tests/test_learners.py - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "tests/test_learners.py" }} - - test_utils: - docker: - - image: circleci/python:3.6.1 - - working_directory: ~/repo - - steps: - - checkout - - - run: - name: test_utils - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - python3 -m unittest tests/test_utils.py - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "tests/test_utils.py" }} + key: v1-dependencies-{{ checksum "test_layer.py" }} + workflows: version: 2 build_and_test: jobs: - build - - test_nets - - test_attacks - - test_one_calls - - test_metrics - - test_learners - - test_utils + - test_layer + From 0be07530dc2da32702bca31f13599a9596af8123 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:03:21 +0530 Subject: [PATCH 07/25] Create test_layer.py --- tests/test_layer.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/test_layer.py diff --git a/tests/test_layer.py b/tests/test_layer.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/test_layer.py @@ -0,0 +1 @@ + From 55e08fc41ab1a4bdc7c8cb7a8e186b5ceff8f1ad Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:08:19 +0530 Subject: [PATCH 08/25] Update test_layer.py --- tests/test_layer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_layer.py b/tests/test_layer.py index 8b13789..057aa4b 100644 --- a/tests/test_layer.py +++ b/tests/test_layer.py @@ -1 +1,11 @@ +import tensorflow as tf +import os +from tensorflow.python.keras.layers import Layer +from tensorflow.python.keras import backend as K +import s-atmech as sa +from s-atmech.AttentionLayer import AttentionLayer + +if __name__ == "__main__": + lyr = AttentionLayer(lyr) + print (lyr.compute_output_shape(10)) From 4b922d8db6af751cdc7b6b729d7ad125a8b56148 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:09:10 +0530 Subject: [PATCH 09/25] Create __init__.py --- tests/__init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ + From 7c458ed2398233eda5ab36b2ad79bb6922aa9d7a Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:26:01 +0530 Subject: [PATCH 10/25] Update test_layer.py --- tests/test_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_layer.py b/tests/test_layer.py index 057aa4b..f806fef 100644 --- a/tests/test_layer.py +++ b/tests/test_layer.py @@ -8,4 +8,4 @@ if __name__ == "__main__": lyr = AttentionLayer(lyr) - print (lyr.compute_output_shape(10)) + lyr.compute_output_shape(10) From 2d0228a06e878752e8d9cef9792e35d9cfa0efd1 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:26:11 +0530 Subject: [PATCH 11/25] Update test_layer.py From 52d74f0507904e7b31e9efa4d5cd8d90d9def95e Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:31:33 +0530 Subject: [PATCH 12/25] Update test_layer.py --- tests/test_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_layer.py b/tests/test_layer.py index f806fef..0be1250 100644 --- a/tests/test_layer.py +++ b/tests/test_layer.py @@ -3,7 +3,7 @@ from tensorflow.python.keras.layers import Layer from tensorflow.python.keras import backend as K -import s-atmech as sa + from s-atmech.AttentionLayer import AttentionLayer if __name__ == "__main__": From cac97d20807f1ea2885f5670990f734e45d45db3 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:35:44 +0530 Subject: [PATCH 13/25] Update test_layer.py --- tests/test_layer.py | 119 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 117 insertions(+), 2 deletions(-) diff --git a/tests/test_layer.py b/tests/test_layer.py index 0be1250..1ceef45 100644 --- a/tests/test_layer.py +++ b/tests/test_layer.py @@ -4,8 +4,123 @@ from tensorflow.python.keras import backend as K -from s-atmech.AttentionLayer import AttentionLayer +class AttentionLayer(Layer): + """ + There are three sets of weights introduced W_a, U_a, and V_a + """ + def __init__(self, **kwargs): + super(AttentionLayer, self).__init__(**kwargs) + + def build(self, input_shape): + assert isinstance(input_shape, list) + # Create a trainable weight variable for this layer. + + self.W_a = self.add_weight(name='W_a', + shape=tf.TensorShape((input_shape[0][2], input_shape[0][2])), + initializer='uniform', + trainable=True) + self.U_a = self.add_weight(name='U_a', + shape=tf.TensorShape((input_shape[1][2], input_shape[0][2])), + initializer='uniform', + trainable=True) + self.V_a = self.add_weight(name='V_a', + shape=tf.TensorShape((input_shape[0][2], 1)), + initializer='uniform', + trainable=True) + + super(AttentionLayer, self).build(input_shape) # Be sure to call this at the end + + def call(self, inputs, verbose=False): + """ + inputs: [encoder_output_sequence, decoder_output_sequence] + """ + assert type(inputs) == list + encoder_out_seq, decoder_out_seq = inputs + if verbose: + print('encoder_out_seq>', encoder_out_seq.shape) + print('decoder_out_seq>', decoder_out_seq.shape) + + def energy_step(inputs, states): + """ Step function for computing energy for a single decoder state """ + + assert_msg = "States must be a list. However states {} is of type {}".format(states, type(states)) + assert isinstance(states, list) or isinstance(states, tuple), assert_msg + + """ Some parameters required for shaping tensors""" + en_seq_len, en_hidden = encoder_out_seq.shape[1], encoder_out_seq.shape[2] + de_hidden = inputs.shape[-1] + + """ Computing S.Wa where S=[s0, s1, ..., si]""" + # <= batch_size*en_seq_len, latent_dim + reshaped_enc_outputs = K.reshape(encoder_out_seq, (-1, en_hidden)) + # <= batch_size*en_seq_len, latent_dim + W_a_dot_s = K.reshape(K.dot(reshaped_enc_outputs, self.W_a), (-1, en_seq_len, en_hidden)) + if verbose: + print('wa.s>',W_a_dot_s.shape) + + """ Computing hj.Ua """ + U_a_dot_h = K.expand_dims(K.dot(inputs, self.U_a), 1) # <= batch_size, 1, latent_dim + if verbose: + print('Ua.h>',U_a_dot_h.shape) + + """ tanh(S.Wa + hj.Ua) """ + # <= batch_size*en_seq_len, latent_dim + reshaped_Ws_plus_Uh = K.tanh(K.reshape(W_a_dot_s + U_a_dot_h, (-1, en_hidden))) + if verbose: + print('Ws+Uh>', reshaped_Ws_plus_Uh.shape) + + """ softmax(va.tanh(S.Wa + hj.Ua)) """ + # <= batch_size, en_seq_len + e_i = K.reshape(K.dot(reshaped_Ws_plus_Uh, self.V_a), (-1, en_seq_len)) + # <= batch_size, en_seq_len + e_i = K.softmax(e_i) + + if verbose: + print('ei>', e_i.shape) + + return e_i, [e_i] + + def context_step(inputs, states): + """ Step function for computing ci using ei """ + # <= batch_size, hidden_size + c_i = K.sum(encoder_out_seq * K.expand_dims(inputs, -1), axis=1) + if verbose: + print('ci>', c_i.shape) + return c_i, [c_i] + + def create_inital_state(inputs, hidden_size): + + fake_state = K.zeros_like(inputs) # <= (batch_size, enc_seq_len, latent_dim + fake_state = K.sum(fake_state, axis=[1, 2]) # <= (batch_size) + fake_state = K.expand_dims(fake_state) # <= (batch_size, 1) + fake_state = K.tile(fake_state, [1, hidden_size]) # <= (batch_size, latent_dim + return fake_state + + fake_state_c = create_inital_state(encoder_out_seq, encoder_out_seq.shape[-1]) + fake_state_e = create_inital_state(encoder_out_seq, encoder_out_seq.shape[1]) # <= (batch_size, enc_seq_len, latent_dim + + """ Computing energy outputs """ + # e_outputs => (batch_size, de_seq_len, en_seq_len) + last_out, e_outputs, _ = K.rnn( + energy_step, decoder_out_seq, [fake_state_e], + ) + + """ Computing context vectors """ + last_out, c_outputs, _ = K.rnn( + context_step, e_outputs, [fake_state_c], + ) + + return c_outputs, e_outputs + + def compute_output_shape(self, input_shape): + """ Outputs produced by the layer """ + return [ + tf.TensorShape((input_shape[1][0], input_shape[1][1], input_shape[1][2])), + tf.TensorShape((input_shape[1][0], input_shape[1][1], input_shape[0][1])) + ] + + """testing""" if __name__ == "__main__": lyr = AttentionLayer(lyr) - lyr.compute_output_shape(10) + print (lyr.compute_output_shape(10)) From 23ef38bcb122b6540a9c0ff25f213c98ed0b3fb5 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:36:07 +0530 Subject: [PATCH 14/25] Update test_layer.py --- tests/test_layer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_layer.py b/tests/test_layer.py index 1ceef45..dde841b 100644 --- a/tests/test_layer.py +++ b/tests/test_layer.py @@ -120,7 +120,4 @@ def compute_output_shape(self, input_shape): tf.TensorShape((input_shape[1][0], input_shape[1][1], input_shape[0][1])) ] - """testing""" -if __name__ == "__main__": - lyr = AttentionLayer(lyr) - print (lyr.compute_output_shape(10)) + From 5388c7bd5784d5c79de2536abe2c32b65bd283ee Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:41:23 +0530 Subject: [PATCH 15/25] Update __init__.py --- s-atmech/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s-atmech/__init__.py b/s-atmech/__init__.py index a4a9e2b..d463e08 100644 --- a/s-atmech/__init__.py +++ b/s-atmech/__init__.py @@ -1 +1 @@ -from s-atmech.AttentionLayer import AttentionLayer +from s-atmech import AttentionLayer From d85e733f409b28f5f6418d0b3cec928057efd63a Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:42:17 +0530 Subject: [PATCH 16/25] Update __init__.py --- tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 8b13789..d463e08 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1 @@ - +from s-atmech import AttentionLayer From 29b8967ec4956df54f72ae3995ebd80798bcbe4f Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:42:57 +0530 Subject: [PATCH 17/25] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index ba944d5..0eecf7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ Pillow>=6.1.0 nltk>=3.4.5 pyYAML>=5.2 scipy>=1.3.0 +s-atmech From c4916ffe6c6e15b6d42d4c34e9f48833e8773885 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:46:26 +0530 Subject: [PATCH 18/25] Update config.yml --- .circleci/config.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 53ae779..1c55f8c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,6 +47,28 @@ jobs: paths: - ./venv key: v1-dependencies-{{ checksum "test_layer.py" }} + + __init__: + docker: + - image: circleci/python:3.6.1 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: __init__ + command: | + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + python3 -m unittest tests/__init__.py.py + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "__init__.py" }} + workflows: @@ -55,4 +77,5 @@ workflows: jobs: - build - test_layer + - __init__ From 1aa9933067b042d38f63b9d1e2ff2de89be68a0f Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:52:04 +0530 Subject: [PATCH 19/25] Update config.yml --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c55f8c..b4dcdb6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,26 +48,26 @@ jobs: - ./venv key: v1-dependencies-{{ checksum "test_layer.py" }} - __init__: - docker: - - image: circleci/python:3.6.1 + test_import: + docker: + - image: circleci/python:3.6.1 working_directory: ~/repo - steps: - - checkout + steps: + - checkout - run: - name: __init__ + name: test_import command: | python3 -m venv venv . venv/bin/activate pip install -r requirements.txt - python3 -m unittest tests/__init__.py.py + python3 -m unittest tests/test_import.py - save_cache: paths: - ./venv - key: v1-dependencies-{{ checksum "__init__.py" }} + key: v1-dependencies-{{ checksum "test_import.py" }} @@ -77,5 +77,5 @@ workflows: jobs: - build - test_layer - - __init__ + - test_import From f87a5c7aa2cfb871fe99d38632ffb532934f4d94 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:52:30 +0530 Subject: [PATCH 20/25] Update __init__.py --- tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index d463e08..8b13789 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1 @@ -from s-atmech import AttentionLayer + From 40206ad29294e50d90da981c102f80b6cedfc711 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:52:53 +0530 Subject: [PATCH 21/25] Create test_import.py --- tests/test_import.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/test_import.py diff --git a/tests/test_import.py b/tests/test_import.py new file mode 100644 index 0000000..d463e08 --- /dev/null +++ b/tests/test_import.py @@ -0,0 +1 @@ +from s-atmech import AttentionLayer From 119fd4632ba9462f7e620fd25d45c7759ba0a5af Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:56:49 +0530 Subject: [PATCH 22/25] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b4dcdb6..3253612 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ jobs: working_directory: ~/repo steps: - - checkout + - checkout - run: name: test_import From 68ee1281e5159eadcd6a5fbdbaabd6c3c6374416 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:58:43 +0530 Subject: [PATCH 23/25] Update config.yml --- .circleci/config.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3253612..d8cb7a5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,28 +48,7 @@ jobs: - ./venv key: v1-dependencies-{{ checksum "test_layer.py" }} - test_import: - docker: - - image: circleci/python:3.6.1 - - working_directory: ~/repo - - steps: - - checkout - - - run: - name: test_import - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - python3 -m unittest tests/test_import.py - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "test_import.py" }} - - + workflows: version: 2 From 205d610a482c9313e401f1c2142816d38bf043e5 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 19:59:31 +0530 Subject: [PATCH 24/25] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8cb7a5..bf2c5b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -56,5 +56,5 @@ workflows: jobs: - build - test_layer - - test_import + From ecbd4662e5a9381877bc403f4a8d112a4a04bd20 Mon Sep 17 00:00:00 2001 From: Somyajit Chakraborty Sam Date: Mon, 30 Dec 2019 20:06:38 +0530 Subject: [PATCH 25/25] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3b7302d..d36fd15 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Gitter](https://badges.gitter.im/s-atmech/community.svg)](https://gitter.im/s-atmech/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![CircleCI](https://circleci.com/gh/Samsomyajit/s-atmech/tree/master.svg?style=svg)](https://circleci.com/gh/Samsomyajit/s-atmech/tree/master)