Skip to content

Commit 06e8df0

Browse files
authored
Merge pull request #290 from roboflow/al_fix
Active Learning - Ability to change inference server path.
2 parents aac400d + 67d94ce commit 06e8df0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roboflow/core/workspace.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ def active_learning(
395395
upload_destination: str = "",
396396
conditionals: dict = {},
397397
use_localhost: bool = False,
398+
local_server="http://localhost:9001/",
398399
) -> Any:
399400
"""perform inference on each image in directory and upload based on conditions
400401
@params:
@@ -404,6 +405,7 @@ def active_learning(
404405
upload_destination: (str) = name of the upload project
405406
conditionals: (dict) = dictionary of upload conditions
406407
use_localhost: (bool) = determines if local http format used or remote endpoint
408+
local_server: (str) = local http address for inference server, use_localhost must be True for this to be used
407409
""" # noqa: E501 // docs
408410
prediction_results = []
409411

@@ -431,7 +433,10 @@ def active_learning(
431433
)
432434

433435
# check if inference_model references endpoint or local
434-
local = "http://localhost:9001/" if use_localhost else None
436+
if use_localhost:
437+
local = local_server
438+
else:
439+
local = None
435440

436441
inference_model = (
437442
self.project(inference_endpoint[0]).version(version_number=inference_endpoint[1], local=local).model

0 commit comments

Comments
 (0)