Skip to content

Commit

Permalink
Merge pull request #99 from inverted-ai/master
Browse files Browse the repository at this point in the history
sync doc
  • Loading branch information
Ruishenl committed Dec 9, 2022
2 parents 291ea30 + cc99d04 commit e402e03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
13 changes: 0 additions & 13 deletions invertedai/api/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ class InitializeResponse(BaseModel):
@validate_arguments
def initialize(
location: str,
conditional_agent_states: Optional[List[AgentState]] = None,
conditional_agent_attributes: Optional[List[AgentAttributes]] = None,
agent_attributes: Optional[List[AgentAttributes]] = None,
states_history: Optional[List[List[AgentState]]] = None,
traffic_light_state_history: Optional[
Expand Down Expand Up @@ -96,13 +94,6 @@ def initialize(
If `states_history` is not specified, this needs to be provided and dictates how many
agents will be spawned.
conditional_agent_states:
Optional conditional agent states when `agent_count` is passed. When passed, `agent_count` includes the number of
conditional agents passed.
conditional_agent_attributes:
Optional agent attributes when `conditional_agent_states` is passed
random_seed:
Controls the stochastic aspects of initialization for reproducibility.
Expand Down Expand Up @@ -142,10 +133,6 @@ def initialize(
model_inputs = dict(
location=location,
num_agents_to_spawn=agent_count,
conditional_agent_states=conditional_agent_states if conditional_agent_states is None
else [states.tolist() for states in conditional_agent_states],
conditional_agent_attributes=conditional_agent_attributes if conditional_agent_attributes is None
else [state.tolist() for state in conditional_agent_attributes],
states_history=states_history
if states_history is None
else [[st.tolist() for st in states] for states in states_history],
Expand Down
3 changes: 3 additions & 0 deletions invertedai/api/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class LocationResponse(BaseModel):
] #: Convex polygon denoting the boundary of the supported area within the location.
birdview_image: Image #: Visualization of the location.
osm_map: Optional[LocationMap] #: Underlying map annotation, returned if `include_map_source` was set.
map_center: Point #: The x,y coordinate of the center of the map.
map_fov: float #: The field of view in meters for the birdview image.
static_actors: List[StaticMapActor] #: Lists traffic lights with their IDs and locations.


Expand Down Expand Up @@ -78,6 +80,7 @@ def location_info(
origin=Origin.fromlist(
response["map_origin"]))
del response["map_origin"]
response["map_center"] = Point.fromlist(response["map_center"])
response['birdview_image'] = Image.fromval(response['birdview_image'])
return LocationResponse(**response)
except TryAgain as e:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "invertedai"
version = "0.0.6rc0"
version = "0.0.6post1"
description = "Client SDK for InvertedAI"
authors = ["Inverted AI <info@inverted.ai>"]
readme = "README.md"
Expand Down

0 comments on commit e402e03

Please sign in to comment.