File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 7
7
PRESIGN_EXPIRY_SECONDS = 60 * 60 * 24 * 2 # 2 days
8
8
9
9
TEST_MODEL_NAME = "[PyTest] Test Model"
10
- TEST_MODEL_REFERENCE = "[PyTest] Test Model Reference" + str (time .time ())
11
10
TEST_MODEL_RUN = "[PyTest] Test Model Run"
12
11
TEST_DATASET_NAME = "[PyTest] Test Dataset"
13
12
TEST_SLICE_NAME = "[PyTest] Test Slice"
Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
+ import time
2
3
import pytest
3
4
from nucleus import (
4
5
Dataset ,
19
20
)
20
21
from helpers import (
21
22
TEST_MODEL_NAME ,
22
- TEST_MODEL_REFERENCE ,
23
23
TEST_MODEL_RUN ,
24
24
TEST_PREDS ,
25
25
)
@@ -46,8 +46,9 @@ def test_repr(test_object: any):
46
46
def test_model_creation_and_listing (CLIENT , dataset ):
47
47
models_before = CLIENT .list_models ()
48
48
49
+ model_reference = "model_" + time .time ()
49
50
# Creation
50
- model = CLIENT .add_model (TEST_MODEL_NAME , TEST_MODEL_REFERENCE )
51
+ model = CLIENT .add_model (TEST_MODEL_NAME , model_reference )
51
52
m_run = model .create_run (TEST_MODEL_RUN , dataset , TEST_PREDS )
52
53
m_run .commit ()
53
54
Original file line number Diff line number Diff line change 1
1
import pytest
2
-
2
+ import time
3
3
from helpers import (
4
4
TEST_DATASET_NAME ,
5
5
TEST_MODEL_NAME ,
6
- TEST_MODEL_REFERENCE ,
7
6
TEST_MODEL_RUN ,
8
7
TEST_IMG_URLS ,
9
8
TEST_BOX_PREDICTIONS ,
@@ -58,7 +57,7 @@ def model_run(CLIENT):
58
57
assert ERROR_PAYLOAD not in response .json ()
59
58
60
59
model = CLIENT .add_model (
61
- name = TEST_MODEL_NAME , reference_id = TEST_MODEL_REFERENCE
60
+ name = TEST_MODEL_NAME , reference_id = "model_" + str ( time . time ())
62
61
)
63
62
64
63
run = model .create_run (name = TEST_MODEL_RUN , dataset = ds , predictions = [])
You can’t perform that action at this time.
0 commit comments