From cfd22421129c22bea727bda6d41b2642449eec7e Mon Sep 17 00:00:00 2001 From: likejiao Date: Mon, 16 Mar 2020 19:39:23 +0800 Subject: [PATCH] add Apache License comment --- benchmark/torch/coma/coma_config.py | 14 ++++++++++++++ benchmark/torch/coma/sc2_agent.py | 15 ++++++++++++++- benchmark/torch/coma/sc2_model.py | 15 ++++++++++++++- benchmark/torch/coma/starcraft2/build_docker.sh | 1 - benchmark/torch/coma/train.py | 14 ++++++++++++++ parl/algorithms/torch/__init__.py | 1 + 6 files changed, 57 insertions(+), 3 deletions(-) diff --git a/benchmark/torch/coma/coma_config.py b/benchmark/torch/coma/coma_config.py index 364ea05..25d6971 100644 --- a/benchmark/torch/coma/coma_config.py +++ b/benchmark/torch/coma/coma_config.py @@ -1,3 +1,17 @@ +# Copyright (c) 2020 PaddlePaddle Authors. 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/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # arguments of coma config = { # ========== Environment ========== diff --git a/benchmark/torch/coma/sc2_agent.py b/benchmark/torch/coma/sc2_agent.py index db8ab98..08af985 100644 --- a/benchmark/torch/coma/sc2_agent.py +++ b/benchmark/torch/coma/sc2_agent.py @@ -1,4 +1,17 @@ -# -*- coding: UTF-8 -*- +# Copyright (c) 2020 PaddlePaddle Authors. 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/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import numpy as np import parl import torch diff --git a/benchmark/torch/coma/sc2_model.py b/benchmark/torch/coma/sc2_model.py index abf3d9b..8fd1fa6 100644 --- a/benchmark/torch/coma/sc2_model.py +++ b/benchmark/torch/coma/sc2_model.py @@ -1,4 +1,17 @@ -# -*- coding: UTF-8 -*- +# Copyright (c) 2020 PaddlePaddle Authors. 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/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import torch.nn as nn import torch.nn.functional as F import numpy as np diff --git a/benchmark/torch/coma/starcraft2/build_docker.sh b/benchmark/torch/coma/starcraft2/build_docker.sh index 9406390..ad7a742 100644 --- a/benchmark/torch/coma/starcraft2/build_docker.sh +++ b/benchmark/torch/coma/starcraft2/build_docker.sh @@ -1,6 +1,5 @@ #!/bin/bash - #### ------------------------------------------------------------------- #### build docker image #### ------------------------------------------------------------------- diff --git a/benchmark/torch/coma/train.py b/benchmark/torch/coma/train.py index 525c592..6c60b8a 100644 --- a/benchmark/torch/coma/train.py +++ b/benchmark/torch/coma/train.py @@ -1,3 +1,17 @@ +# Copyright (c) 2020 PaddlePaddle Authors. 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/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from smac.env import StarCraft2Env import numpy as np import os diff --git a/parl/algorithms/torch/__init__.py b/parl/algorithms/torch/__init__.py index dc2aaba..9782676 100644 --- a/parl/algorithms/torch/__init__.py +++ b/parl/algorithms/torch/__init__.py @@ -16,4 +16,5 @@ from parl.algorithms.torch.ddqn import * from parl.algorithms.torch.dqn import * from parl.algorithms.torch.a2c import * from parl.algorithms.torch.td3 import * +from parl.algorithms.torch.coma import * from parl.algorithms.torch.policy_gradient import * -- GitLab