Skip to content

Commit

Permalink
Resolved precision bug & some linting (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWilkie authored Jan 8, 2024
1 parent e825c34 commit b3e9317
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions darwin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,9 @@ def get_team_properties(
team_slug=team_slug or self.default_team,
)

def create_property(self, team_slug: Optional[str], params: Union[FullProperty, JSONDict]) -> FullProperty:
def create_property(
self, team_slug: Optional[str], params: Union[FullProperty, JSONDict]
) -> FullProperty:
darwin_config = DarwinConfig.from_old(self.config)
future_client = ClientCore(darwin_config)

Expand All @@ -1513,12 +1515,14 @@ def create_property(self, team_slug: Optional[str], params: Union[FullProperty,
params=params,
)

def update_property(self, team_slug: Optional[str], params: Union[FullProperty, JSONDict]) -> FullProperty:
def update_property(
self, team_slug: Optional[str], params: Union[FullProperty, JSONDict]
) -> FullProperty:
darwin_config = DarwinConfig.from_old(self.config)
future_client = ClientCore(darwin_config)

return update_property_future(
client=future_client,
team_slug=team_slug or self.default_team,
params=params,
)
)
1 change: 1 addition & 0 deletions darwin/torch/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ def get_target(self, index: int) -> Dict[str, Any]:
annotation.data[path_key],
height=target["height"],
width=target["width"],
rounding=False,
)
# Compute the bbox of the polygon
x_coords = [s[0::2] for s in sequences]
Expand Down
4 changes: 3 additions & 1 deletion darwin/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,9 @@ def _parse_annotators(annotators: List[Dict[str, Any]]) -> List[dt.AnnotationAut
]


def _parse_properties(properties: List[Dict[str, Any]]) -> Optional[List[SelectedProperty]]:
def _parse_properties(
properties: List[Dict[str, Any]]
) -> Optional[List[SelectedProperty]]:
selected_properties = []
for property in properties:
selected_properties.append(
Expand Down

0 comments on commit b3e9317

Please sign in to comment.