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

Pin numpy to 1.21.2 #257

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Pin numpy to 1.21.2 #257

wants to merge 5 commits into from

Conversation

benjaminrwilson
Copy link
Contributor

@benjaminrwilson benjaminrwilson commented Jul 22, 2021

Draft. Does not need review currently. Will be resolved after disparity_interpolation refactor.

@benjaminrwilson benjaminrwilson marked this pull request as draft July 26, 2021 16:44
@@ -25,7 +26,7 @@ def __init__(self, root_dir: str) -> None:
self.CAMERA_LIST = CAMERA_LIST
self._log_list: Optional[List[str]] = None
self._image_list: Optional[Dict[str, Dict[str, List[str]]]] = None
self._image_list_sync: Optional[Dict[str, Dict[str, List[np.ndarray]]]] = None
self._image_list_sync: Optional[Dict[str, Dict[str, List[NDArray[np.float64]]]]] = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Anna, the image timestamps should be in nanoseconds (integers), so likely we need to cast to np.int32 or np.int64 somewhere beforehand

@@ -77,7 +77,7 @@ def seq_df(self) -> pd.DataFrame:
return _read_csv(self.current_seq)

@property
def agent_traj(self) -> np.ndarray:
def agent_traj(self) -> Any:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can cast the return arg to np.array() since, np.column_stack() should hopefully only return an array

@benjaminrwilson benjaminrwilson changed the title Pin numpy to 1.2.1 Pin numpy to 1.2.2 Sep 14, 2021
@benjaminrwilson benjaminrwilson changed the title Pin numpy to 1.2.2 Pin numpy to 1.21.2 Sep 14, 2021
@@ -117,7 +118,7 @@ def evaluate(self) -> pd.DataFrame:
gt_fpaths = list(self.gt_root_fpath.glob("*/per_sweep_annotations_amodal/*.json"))

assert len(dt_fpaths) == len(gt_fpaths)
data: DefaultDict[str, List[np.ndarray]] = defaultdict(list)
data: DefaultDict[str, List[NDArray[np.float64]]] = defaultdict(list)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ahuller3, thanks for your work on this.

@benjaminrwilson and I were reviewing this today, and we were thinking it might be easier for readability to do something like

if we create something like argoverse/typing/numpy.py

NDArrayFloat = Union[NDArray[np.float32], NDArray[np.float64]]

What are your thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants