Skip to content

Commit 6c3fc0e

Browse files
committed
Revert changes to lock files
1 parent eb16f04 commit 6c3fc0e

File tree

3 files changed

+56
-16
lines changed

3 files changed

+56
-16
lines changed

feature-schema-attributes-testing.py

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import os
2-
from libs.labelbox.src.labelbox import Client
3-
from libs.labelbox.src.labelbox.schema.ontology import OntologyBuilder, Tool
4-
from libs.labelbox.src.labelbox.schema.tool_building.classification import Classification, Option
5-
from libs.labelbox.src.labelbox.schema.tool_building.types import FeatureSchemaAttribute
6-
from libs.labelbox.src.labelbox.schema.media_type import MediaType
7-
from libs.labelbox.src.labelbox.schema.ontology_kind import OntologyKind
8-
import json
2+
from labelbox import Client
3+
from labelbox.schema.ontology import OntologyBuilder, Tool, PromptIssueTool
4+
from labelbox.schema.tool_building.classification import Classification, Option
5+
from labelbox.schema.tool_building.types import FeatureSchemaAttribute
6+
from labelbox.schema.media_type import MediaType
7+
from labelbox.schema.ontology_kind import OntologyKind
98

109

1110
client = Client(
@@ -48,7 +47,7 @@
4847
]
4948
)
5049

51-
# client.create_ontology("Auto OCR ontology", builder.asdict(), media_type=MediaType.Document)
50+
# client.create_ontology("Auto OCR ontology from sdk", builder.asdict(), media_type=MediaType.Document)
5251

5352
builder = OntologyBuilder(
5453
classifications=[
@@ -78,7 +77,7 @@
7877
scope=Classification.Scope.GLOBAL,
7978
attributes=[
8079
FeatureSchemaAttribute(
81-
attributeName="required-connection",
80+
attributeName="requires-connection",
8281
attributeValue="true"
8382
)
8483
],
@@ -111,5 +110,48 @@
111110
# feature_schema = client.update_feature_schema_title('cm4rc1nl90h36070782v9hlpt', 'This is a new title - did it remove the feature schema attributes? UPDATED')
112111
# client.delete_unused_feature_schema('cm4rhzhn7026e07wm2az681di')
113112

114-
feature_schema = client.create_feature_schema(normalized={'tool': 'rectangle', 'name': 'cat', 'color': 'black', 'attributes': [{'attributeName': 'auto-ocr', 'attributeValue': 'true'}]})
115-
print(feature_schema)
113+
# feature_schema = client.create_feature_schema(normalized={'tool': 'rectangle', 'name': 'cat', 'color': 'black', 'attributes': [{'attributeName': 'auto-ocr', 'attributeValue': 'true'}]})
114+
# print(feature_schema)
115+
116+
# classification = Classification.from_dict({
117+
# "name": "Test Classification",
118+
# "instructions": "Test instructions",
119+
# "type": "text", # or "checklist" or other valid Classification.Type values
120+
# "scope": "index", # or "index" for Classification.Scope values
121+
# "required": False, # optional
122+
# "attributes": [ # optional
123+
# {
124+
# "attributeName": "prompt-message-scope",
125+
# "attributeValue": "true"
126+
# }
127+
# ],
128+
# "options": []
129+
# })
130+
131+
# tool = Tool.from_dict({
132+
# "name": "Test Tool",
133+
# "type": "rectangle", # or "checklist" or other valid Classification.Type values
134+
# "required": False, # optional
135+
# "attributes": [ # optional
136+
# {
137+
# "attributeName": "auto-ocr",
138+
# "attributeValue": "true"
139+
# }
140+
# ],
141+
# "options": []
142+
# })
143+
144+
tool = PromptIssueTool.from_dict({
145+
"name": "Test Tool",
146+
"type": "rectangle", # or "checklist" or other valid Classification.Type values
147+
"required": False, # optional
148+
"attributes": [ # optional
149+
{
150+
"attributeName": "auto-ocr",
151+
"attributeValue": "true"
152+
}
153+
],
154+
"options": [],
155+
})
156+
157+
# print(tool)

requirements-dev.lock

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# features: []
77
# all-features: true
88
# with-sources: false
9-
# generate-hashes: false
109

1110
-e file:libs/labelbox
1211
-e file:libs/lbox-clients
@@ -134,7 +133,7 @@ nbconvert==7.16.4
134133
nbformat==5.10.4
135134
# via nbclient
136135
# via nbconvert
137-
numpy==2.0.2
136+
numpy==1.24.4
138137
# via labelbox
139138
# via opencv-python-headless
140139
# via pandas
@@ -148,7 +147,7 @@ packaging==24.1
148147
# via pytest-cases
149148
# via pytest-rerunfailures
150149
# via sphinx
151-
pandas==2.2.3
150+
pandas==2.0.3
152151
pandocfilters==1.5.1
153152
# via nbconvert
154153
parso==0.8.4

requirements.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# features: []
77
# all-features: true
88
# with-sources: false
9-
# generate-hashes: false
109

1110
-e file:libs/labelbox
1211
-e file:libs/lbox-clients
@@ -55,7 +54,7 @@ mypy==1.10.1
5554
# via labelbox
5655
mypy-extensions==1.0.0
5756
# via mypy
58-
numpy==2.0.2
57+
numpy==1.24.4
5958
# via labelbox
6059
# via opencv-python-headless
6160
# via shapely

0 commit comments

Comments
 (0)