@@ -131,10 +131,10 @@ def test_websocket_actor_run_model_internal(data, model, sample, request):
131131 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
132132 inspection_id = 0
133133
134- with utils .MockedProjectCacheDir (project_key ):
134+ with utils .MockedProjectCacheDir ():
135135 # Prepare dataset and model
136- utils .local_save_model_under_giskard_home_cache (model , project_key )
137- utils .local_save_dataset_under_giskard_home_cache (dataset , project_key )
136+ utils .local_save_model_under_giskard_home_cache (model )
137+ utils .local_save_dataset_under_giskard_home_cache (dataset )
138138
139139 params = websocket .RunModelParam (
140140 model = websocket .ArtifactRef (project_key = project_key , id = str (model .id )),
@@ -146,7 +146,7 @@ def test_websocket_actor_run_model_internal(data, model, sample, request):
146146 reply = listener .run_model (client = None , params = params )
147147 assert isinstance (reply , websocket .Empty )
148148 # Inspection are logged locally
149- inspection_path = settings .home_dir / "projects" / project_key / "models" / "inspections" / str (inspection_id )
149+ inspection_path = settings .home_dir / "artifacts" / "models" / "inspections" / str (inspection_id )
150150 assert (inspection_path / get_file_name ("predictions" , "csv" , sample )).exists ()
151151 assert (inspection_path / get_file_name ("calculated" , "csv" , sample )).exists ()
152152 # Clean up
@@ -170,7 +170,7 @@ def test_websocket_actor_run_model(data, model, sample, request):
170170 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
171171 inspection_id = 0
172172
173- with utils .MockedProjectCacheDir (project_key ):
173+ with utils .MockedProjectCacheDir ():
174174 params = websocket .RunModelParam (
175175 model = websocket .ArtifactRef (project_key = project_key , id = str (model .id )),
176176 dataset = websocket .ArtifactRef (project_key = project_key , id = str (dataset .id ), sample = sample ),
@@ -199,10 +199,10 @@ def test_websocket_actor_run_model_for_data_frame_regression(internal, request):
199199
200200 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
201201
202- with utils .MockedProjectCacheDir (project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
202+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
203203 # Prepare model
204204 if internal :
205- utils .local_save_model_under_giskard_home_cache (model , project_key )
205+ utils .local_save_model_under_giskard_home_cache (model )
206206 else :
207207 utils .register_uri_for_model_meta_info (mr , model , project_key )
208208 utils .register_uri_for_model_artifact_info (mr , model , project_key , register_file_contents = True )
@@ -239,10 +239,10 @@ def test_websocket_actor_run_model_for_data_frame_classification(internal, reque
239239
240240 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
241241
242- with utils .MockedProjectCacheDir (project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
242+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
243243 # Prepare model
244244 if internal :
245- utils .local_save_model_under_giskard_home_cache (model , project_key )
245+ utils .local_save_model_under_giskard_home_cache (model )
246246 else :
247247 utils .register_uri_for_model_meta_info (mr , model , project_key )
248248 utils .register_uri_for_model_artifact_info (mr , model , project_key , register_file_contents = True )
@@ -279,10 +279,10 @@ def test_websocket_actor_explain_ws_internal(data, model, request):
279279
280280 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
281281
282- with utils .MockedProjectCacheDir (project_key ):
282+ with utils .MockedProjectCacheDir ():
283283 # Prepare model and dataset
284- utils .local_save_model_under_giskard_home_cache (model , project_key )
285- utils .local_save_dataset_under_giskard_home_cache (dataset , project_key )
284+ utils .local_save_model_under_giskard_home_cache (model )
285+ utils .local_save_dataset_under_giskard_home_cache (dataset )
286286
287287 params = websocket .ExplainParam (
288288 model = websocket .ArtifactRef (project_key = project_key , id = str (model .id )),
@@ -301,7 +301,7 @@ def test_websocket_actor_explain_ws(data, model, request):
301301
302302 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
303303
304- with utils .MockedProjectCacheDir (project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
304+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
305305 # Prepare model and dataset
306306 utils .register_uri_for_model_meta_info (mr , model , project_key )
307307 utils .register_uri_for_model_artifact_info (mr , model , project_key , register_file_contents = True )
@@ -324,10 +324,10 @@ def test_websocket_actor_explain_text_ws_regression(internal, request):
324324
325325 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
326326
327- with utils .MockedProjectCacheDir (project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
327+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
328328 # Prepare model and dataset
329329 if internal :
330- utils .local_save_model_under_giskard_home_cache (model , project_key )
330+ utils .local_save_model_under_giskard_home_cache (model )
331331 else :
332332 utils .register_uri_for_model_meta_info (mr , model , project_key )
333333 utils .register_uri_for_model_artifact_info (mr , model , project_key , register_file_contents = True )
@@ -357,9 +357,9 @@ def test_websocket_actor_explain_text_ws_not_text(request):
357357
358358 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
359359
360- with utils .MockedProjectCacheDir (project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
360+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
361361 # Prepare model and dataset
362- utils .local_save_model_under_giskard_home_cache (model , project_key )
362+ utils .local_save_model_under_giskard_home_cache (model )
363363
364364 not_text_feature_name = None
365365 for col_name , col_type in dataset .column_types .items ():
@@ -385,10 +385,10 @@ def test_websocket_actor_explain_text_ws_classification(internal, request):
385385
386386 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
387387
388- with utils .MockedProjectCacheDir (project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
388+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
389389 # Prepare model and dataset
390390 if internal :
391- utils .local_save_model_under_giskard_home_cache (model , project_key )
391+ utils .local_save_model_under_giskard_home_cache (model )
392392 else :
393393 utils .register_uri_for_model_meta_info (mr , model , project_key )
394394 utils .register_uri_for_model_artifact_info (mr , model , project_key , register_file_contents = True )
@@ -419,10 +419,10 @@ def test_websocket_actor_dataset_processing_empty(internal, request):
419419
420420 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
421421
422- with utils .MockedProjectCacheDir (project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
422+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
423423 # Prepare dataset
424424 if internal :
425- utils .local_save_dataset_under_giskard_home_cache (dataset , project_key )
425+ utils .local_save_dataset_under_giskard_home_cache (dataset )
426426 else :
427427 utils .register_uri_for_dataset_meta_info (mr , dataset , project_key )
428428 utils .register_uri_for_dataset_artifact_info (mr , dataset , project_key , register_file_contents = True )
@@ -460,9 +460,9 @@ def test_websocket_actor_dataset_processing_head_slicing_with_cache(callable_und
460460 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
461461 callable_function_project_key = project_key if callable_under_project else None
462462
463- with utils .MockedProjectCacheDir (project_key ):
463+ with utils .MockedProjectCacheDir ():
464464 # Prepare dataset
465- utils .local_save_dataset_under_giskard_home_cache (dataset , project_key )
465+ utils .local_save_dataset_under_giskard_home_cache (dataset )
466466
467467 head_slice .meta .uuid = str (uuid .uuid4 ())
468468
@@ -510,9 +510,9 @@ def test_websocket_actor_dataset_processing_do_nothing_transform_with_cache(call
510510
511511 project_key = str (uuid .uuid4 ()) # Use a UUID to separate the resources used by the tests
512512
513- with utils .MockedProjectCacheDir (project_key ):
513+ with utils .MockedProjectCacheDir ():
514514 # Prepare dataset
515- utils .local_save_dataset_under_giskard_home_cache (dataset , project_key )
515+ utils .local_save_dataset_under_giskard_home_cache (dataset )
516516 callable_function_project_key = project_key if callable_under_project else None
517517
518518 do_nothing .meta .uuid = str (uuid .uuid4 ())
@@ -552,9 +552,9 @@ def test_websocket_actor_create_sub_dataset(request):
552552 dataset : Dataset = request .getfixturevalue ("enron_data" )
553553 project_key = str (uuid .uuid4 ())
554554
555- with utils .MockedProjectCacheDir (project_key = project_key ), utils .MockedClient (mock_all = False ) as (client , mr ):
555+ with utils .MockedProjectCacheDir (), utils .MockedClient (mock_all = False ) as (client , mr ):
556556 # Prepare dataset
557- utils .local_save_dataset_under_giskard_home_cache (dataset , project_key )
557+ utils .local_save_dataset_under_giskard_home_cache (dataset )
558558 utils .register_uri_for_dataset_meta_info (mr , dataset , project_key )
559559
560560 # Prepare dataset upload requests
0 commit comments