Skip to content

Commit 8c0ad5a

Browse files
authored
Add local file config in isort & Add missing copyright info (#547)
* Add local file config; add missing copyright info. * Add empty line at the end of pyproject.toml * Reward calculating bug fix
1 parent 7e3c1d5 commit 8c0ad5a

File tree

71 files changed

+169
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+169
-37
lines changed

.github/linters/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ line-length = 120
44
[tool.isort]
55
profile = "black"
66
line_length = 120
7-
known_first_party = "maro"
7+
known_first_party = ["maro"]
8+
known_local_folder = ["examples", "scripts", "tests"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.

examples/cim/rl/algorithms/ppo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.
3+
14
import torch
25

36
from maro.rl.policy import DiscretePolicyGradient

examples/cim/rl/rl_component_bundle.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.
3+
14
from functools import partial
25
from typing import Any, Callable, Dict, Optional
36

4-
from examples.cim.rl.config import action_num, algorithm, env_conf, num_agents, reward_shaping_conf, state_dim
5-
from examples.cim.rl.env_sampler import CIMEnvSampler
6-
77
from maro.rl.policy import AbsPolicy
88
from maro.rl.rl_component.rl_component_bundle import RLComponentBundle
99
from maro.rl.rollout import AbsEnvSampler
@@ -13,6 +13,8 @@
1313
from .algorithms.dqn import get_dqn, get_dqn_policy
1414
from .algorithms.maddpg import get_maddpg, get_maddpg_policy
1515
from .algorithms.ppo import get_ppo, get_ppo_policy
16+
from examples.cim.rl.config import action_num, algorithm, env_conf, num_agents, reward_shaping_conf, state_dim
17+
from examples.cim.rl.env_sampler import CIMEnvSampler
1618

1719

1820
class CIMBundle(RLComponentBundle):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.

examples/citi_bike/greedy/launcher.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.
3+
14
import heapq
25
import io
36
import os
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.

examples/citi_bike/online_lp/citi_bike_ilp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.
3+
14
import math
25
from typing import List, Tuple
36

examples/citi_bike/online_lp/launcher.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.
3+
14
import argparse
25
import io
36
import math

examples/rl/run_rl_example.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT license.
3+
14
import argparse
25

36
from maro.cli.local.commands import run

0 commit comments

Comments
 (0)