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

Support NumPy > 2.0 and Python 3.12 #115

Merged
merged 6 commits into from
Sep 11, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Format labelstudio.py
  • Loading branch information
lochhh committed Sep 10, 2024
commit 3469637ab5569305bcf018870555384b5e0479ea
19 changes: 10 additions & 9 deletions sleap_io/io/labelstudio.py
Original file line number Diff line number Diff line change
@@ -9,13 +9,14 @@
"""

import datetime
import simplejson as json
import math
import uuid
from typing import Dict, Iterable, List, Tuple, Optional, Union
import warnings
from typing import Dict, Iterable, List, Optional, Tuple, Union

import simplejson as json

from sleap_io import Instance, LabeledFrame, Labels, Node, Point, Video, Skeleton
from sleap_io import Instance, LabeledFrame, Labels, Node, Point, Skeleton, Video


def read_labels(
@@ -193,12 +194,12 @@ def convert_labels(labels: Labels) -> List[dict]:
"result": frame_annots,
"was_cancelled": False,
"ground_truth": False,
"created_at": datetime.datetime.now(datetime.timezone.utc).strftime(
"%Y-%m-%dT%H:%M:%S.%fZ"
),
"updated_at": datetime.datetime.now(datetime.timezone.utc).strftime(
"%Y-%m-%dT%H:%M:%S.%fZ"
),
"created_at": datetime.datetime.now(
datetime.timezone.utc
).strftime("%Y-%m-%dT%H:%M:%S.%fZ"),
"updated_at": datetime.datetime.now(
datetime.timezone.utc
).strftime("%Y-%m-%dT%H:%M:%S.%fZ"),
"lead_time": 0,
"result_count": 1,
# "completed_by": user['id']