Skip to content

Commit 9415689

Browse files
authored
Merge pull request #25 from dule1322/CTX-4251
CTX-4251: Update "model-queue/custom" to "run" endpoint
2 parents a56f872 + e361f67 commit 9415689

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

coretex/coretex/experiment/experiment.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def createQiimeArtifact(self, rootArtifactFolderName: str, qiimeArtifactPath: Pa
390390
# logging.getLogger("coretexpylib").warning(f">> [Coretex] Failed to upload {localFilePath} to {remoteFilePath}")
391391

392392
@classmethod
393-
def startCustomExperiment(
393+
def run(
394394
cls,
395395
projectId: int,
396396
nodeId: Union[int, str],
@@ -438,7 +438,7 @@ def startCustomExperiment(
438438
]
439439
\b
440440
>>> try:
441-
experiment = Experiment.startCustomExperiment(
441+
experiment = Experiment.run(
442442
projectId = 1023,
443443
nodeId = 23,
444444
name = "Dummy Custom Experiment
@@ -457,17 +457,13 @@ def startCustomExperiment(
457457
if parameters is None:
458458
parameters = []
459459

460-
response = networkManager.genericJSONRequest(
461-
f"{cls._endpoint()}/custom",
462-
RequestType.post,
463-
parameters={
464-
"sub_project_id": projectId,
465-
"service_id": nodeId,
466-
"name": name,
467-
"description": description,
468-
"parameters": parameters
469-
}
470-
)
460+
response = networkManager.genericJSONRequest("run", RequestType.post, {
461+
"sub_project_id": projectId,
462+
"service_id": nodeId,
463+
"name": name,
464+
"description": description,
465+
"parameters": parameters
466+
})
471467

472468
if response.hasFailed():
473469
raise NetworkRequestError(response, "Failed to create experiment")

coretex/project/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def processLocal(args: Optional[List[str]] = None) -> Tuple[int, ProjectCallback
113113

114114
parameters = ExperimentParameter.readExperimentConfig()
115115

116-
experiment: Experiment = Experiment.startCustomExperiment(
116+
experiment: Experiment = Experiment.run(
117117
parser.projectId,
118118
# Dummy Local node ID, hardcoded as it is only a temporary solution,
119119
# backend will add a new ExperimentType (local) which does not require a specific

0 commit comments

Comments
 (0)