Skip to content

Commit a58ce6c

Browse files
committed
Remove todos
1 parent 9131d21 commit a58ce6c

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

feature-schema-attributes-testing.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
import json
99

1010

11-
# client = Client(
12-
# api_key=os.environ.get('STAGE_API_KEY'),
13-
# endpoint="https://app.lb-stage.xyz/api/_gql/graphql",
14-
# rest_endpoint="https://app.lb-stage.xyz/api/api/v1")
15-
1611
client = Client(
17-
api_key=os.environ.get('LOCALHOST_API_KEY'),
18-
endpoint="http://localhost:8080/graphql",
19-
rest_endpoint="http://localhost:3000/api/api/v1")
12+
api_key=os.environ.get('STAGE_API_KEY'),
13+
endpoint="https://app.lb-stage.xyz/api/_gql/graphql",
14+
rest_endpoint="https://app.lb-stage.xyz/api/api/v1")
15+
16+
# client = Client(
17+
# api_key=os.environ.get('LOCALHOST_API_KEY'),
18+
# endpoint="http://localhost:8080/graphql",
19+
# rest_endpoint="http://localhost:3000/api/api/v1")
2020

2121
builder = OntologyBuilder(
2222

@@ -97,10 +97,19 @@
9797
# client.create_ontology('Image ontology with requires connection classes', builder.asdict(), media_type=MediaType.Image)
9898

9999

100-
feature_schema = client.upsert_feature_schema(Tool(name='Auto OCR from upsert feature schema', tool=Tool.Type.BBOX, attributes=[FeatureSchemaAttribute(attributeName='auto-ocr', attributeValue='true')]).asdict())
101-
fetched_feature_schema = client.get_feature_schema(feature_schema.uid)
102-
feature_schemas_with_name = client.get_feature_schemas('Auto OCR')
100+
# feature_schema = client.upsert_feature_schema(Tool(name='Testing', tool=Tool.Type.BBOX, attributes=[FeatureSchemaAttribute(attributeName='auto-ocr', attributeValue='true')]).asdict())
101+
# print(feature_schema)
102+
# fetched_feature_schema = client.get_feature_schema(feature_schema.uid)
103+
# feature_schemas_with_name = client.get_feature_schemas('Auto OCR')
104+
105+
# # Iterate over the feature schemas
106+
# for schema in feature_schemas_with_name:
107+
# print(schema)
108+
109+
# ontology = client.create_ontology_from_feature_schemas('Ontology from feature schemas', ['cm4rc1nl90h36070782v9hlpt'])
110+
111+
# feature_schema = client.update_feature_schema_title('cm4rc1nl90h36070782v9hlpt', 'This is a new title - did it remove the feature schema attributes? UPDATED')
112+
# client.delete_unused_feature_schema('cm4rhzhn7026e07wm2az681di')
103113

104-
# Iterate over the feature schemas
105-
for schema in feature_schemas_with_name:
106-
print(schema)
114+
feature_schema = client.create_feature_schema(normalized={'tool': 'rectangle', 'name': 'cat', 'color': 'black', 'attributes': [{'attributeName': 'auto-ocr', 'attributeValue': 'true'}]})
115+
print(feature_schema)

libs/labelbox/src/labelbox/client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,6 @@ def rootSchemaPayloadToFeatureSchema(client, payload):
10731073
["rootSchemaNodes", "nextCursor"],
10741074
)
10751075

1076-
# TODO tkerr:
10771076
def create_ontology_from_feature_schemas(
10781077
self,
10791078
name,
@@ -1332,7 +1331,6 @@ def get_unused_feature_schemas(self, after: str = None) -> List[str]:
13321331
+ str(response.json()["message"])
13331332
)
13341333

1335-
# TODO tkerr:
13361334
def create_ontology(
13371335
self,
13381336
name,

0 commit comments

Comments
 (0)