File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -25,5 +25,5 @@ test-onprem: build
2525 docker run -it -v ${PWD} :/usr/src -w /usr/src \
2626 -e LABELBOX_TEST_ENVIRON=" onprem" \
2727 -e LABELBOX_TEST_API_KEY_ONPREM=${LABELBOX_TEST_API_KEY_ONPREM} \
28- -e LABELBOX_TEST_ONPREM_INSTANCE =${LABELBOX_TEST_ONPREM_INSTANCE } \
28+ -e LABELBOX_TEST_ONPREM_HOSTNAME =${LABELBOX_TEST_ONPREM_HOSTNAME } \
2929 local/labelbox-python:test pytest $(PATH_TO_TEST )
Original file line number Diff line number Diff line change @@ -223,12 +223,11 @@ def entity_inference(prediction_id_mapping):
223223@pytest .fixture
224224def segmentation_inference (prediction_id_mapping ):
225225 segmentation = prediction_id_mapping ['superpixel' ].copy ()
226- segmentation .update ({
227- 'mask' : {
228- 'instanceURI' : "https://picsum.photos/200/300 " ,
226+ segmentation .update (
227+ { 'mask' : {
228+ 'instanceURI' : "sampleuri " ,
229229 'colorRGB' : [0 , 0 , 0 ]
230- }
231- })
230+ }})
232231 del segmentation ['tool' ]
233232 return segmentation
234233
@@ -253,7 +252,7 @@ def segmentation_inference_png(prediction_id_mapping):
253252 segmentation .update ({
254253 'uuid' : str (uuid .uuid4 ()),
255254 'mask' : {
256- 'png' : "https://picsum.photos/200/300 " ,
255+ 'png' : "somedata " ,
257256 }
258257 })
259258 del segmentation ['tool' ]
Original file line number Diff line number Diff line change @@ -48,9 +48,10 @@ def graphql_url(environ: str) -> str:
4848 elif environ == Environ .STAGING :
4949 return 'https://staging-api.labelbox.com/graphql'
5050 elif environ == Environ .ONPREM :
51- instance_id = os .environ .get ('LABELBOX_TEST_ONPREM_INSTANCE ' , None )
52- if instance_id is None :
51+ hostname = os .environ .get ('LABELBOX_TEST_ONPREM_HOSTNAME ' , None )
52+ if hostname is None :
5353 raise Exception (f"Missing LABELBOX_TEST_ONPREM_INSTANCE" )
54+ instance_id = hostname .split ("-" )[1 ].split ("." )[0 ]
5455 return f"https://app.replicated-{ instance_id } .labelbox.dev/api/_gql"
5556 return 'http://host.docker.internal:8080/graphql'
5657
You can’t perform that action at this time.
0 commit comments