Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove protobuf dependency and remote agent code #2065

Merged
merged 4 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
-e missing-function-docstring \
-e missing-class-docstring \
-s n \
--ignore examples,scenarios,docs,manager_pb2_grpc.py,worker_pb2_grpc.py \
--ignore examples,scenarios,docs \
--msg-template='{path}: line {line}: {msg_id}: {msg}' \
./smarts ./envision ./baselines

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Copy and pasting the git commit messages is __NOT__ enough.
- Removed `examples/rl/racing` as base repository `danijar/dreamerv2` is not updated anymore and this example will be superseded by `examples/rl/drive`.
- Removed `FrameStack` environment wrapper.
- Removed `SMARTS.traffic_sim` property.
- Removed remote agent modules.
saulfield marked this conversation as resolved.
Show resolved Hide resolved
- Removed `protobuf` as a core package dependency.
### Security

## [1.1.0] # 2023-04-28
Expand Down
4 changes: 2 additions & 2 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Run the following commands to setup the SMARTS simulator.

# Install smarts with extras as needed. Extras include the following:
# `camera_obs` - needed for rendering camera observations, and for testing.
# `sumo` - needed for using SUMO scenarios.
# `test` - needed for testing.
# `train` - needed for RL training and testing.
$ pip install -e '.[camera_obs,test,train,sumo]'
$ pip install -e .[camera_obs,sumo,test]

# Run sanity-test and verify they are passing.
# If tests fail, check './sanity_test_result.xml' for test report.
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ install_requires =
# The following are planned to be made optional
gymnasium==0.27.0
pybullet>=3,<4.0
protobuf>=3.17.3,<4.0.0 # for /smarts/zoo and remote agents

# The following are planned for removal
gym>=0.17.3,<=0.19.0
Expand Down
12 changes: 4 additions & 8 deletions smarts/core/agent_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
from smarts.core.agent_interface import AgentInterface
from smarts.core.bubble_manager import BubbleManager
from smarts.core.data_model import SocialAgent
from smarts.core.heterogenous_agent_buffer import HeterogenousAgentBuffer
from smarts.core.local_agent_buffer import LocalAgentBuffer
from smarts.core.observations import Observation
from smarts.core.plan import Mission, Plan, PositionalGoal
from smarts.core.plan import Plan
from smarts.core.sensor_manager import SensorManager
from smarts.core.sensors import Sensors
from smarts.core.utils.id import SocialAgentId
from smarts.core.vehicle_state import VehicleState
from smarts.sstudio.types.actor.social_agent_actor import SocialAgentActor
Expand All @@ -47,15 +46,14 @@ class AgentManager:
time.
"""

def __init__(self, sim, interfaces, zoo_addrs=None):
def __init__(self, sim, interfaces):
from smarts.core.vehicle_index import VehicleIndex

self._log = logging.getLogger(self.__class__.__name__)
self._sim = weakref.ref(sim)
self._vehicle_index: VehicleIndex = sim.vehicle_index
self._sensor_manager: SensorManager = sim.sensor_manager
self._agent_buffer = None
self._zoo_addrs = zoo_addrs
self._ego_agent_ids = set()
self._social_agent_ids = set()

Expand Down Expand Up @@ -500,9 +498,7 @@ def init_ego_agents(self):

def _setup_agent_buffer(self):
if not self._agent_buffer:
self._agent_buffer = HeterogenousAgentBuffer(
zoo_manager_addrs=self._zoo_addrs
)
self._agent_buffer = LocalAgentBuffer()

def _setup_social_agents(self):
"""Initialize all social agents."""
Expand Down
47 changes: 0 additions & 47 deletions smarts/core/heterogenous_agent_buffer.py

This file was deleted.

3 changes: 0 additions & 3 deletions smarts/core/local_agent_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from concurrent.futures import ProcessPoolExecutor
from typing import Optional

import psutil

from smarts.core.agent_buffer import AgentBuffer
from smarts.core.buffer_agent import BufferAgent
from smarts.core.local_agent import LocalAgent
Expand Down
133 changes: 0 additions & 133 deletions smarts/core/remote_agent.py

This file was deleted.

Loading