File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 11import logging
2+ import os
23
34import pytest
45import sagemaker
1112
1213
1314# noinspection DuplicatedCode
14- def test_clean_train_warm_pool (request ):
15+ def test_clean_train_warm_pool ():
1516 logging .info ("Starting training" )
1617
17- estimator = PyTorch (entry_point = ' train_clean.py' ,
18+ estimator = PyTorch (entry_point = os . path . basename ( 'source_dir/training_clean/ train_clean.py') ,
1819 source_dir = 'source_dir/training_clean/' ,
19- role = request .config .getini ('sagemaker_role' ),
2020 framework_version = '1.9.1' ,
2121 py_version = 'py38' ,
2222 instance_count = 1 ,
Original file line number Diff line number Diff line change 1+ import logging
2+
13import boto3
24import pytest
5+ import sagemaker .config
36
47from sagemaker .pytorch import PyTorch
58from sagemaker_ssh_helper .wrapper import SSHEnvironmentWrapper , SSHEstimatorWrapper
@@ -102,3 +105,18 @@ def test_bucket_exists():
102105 _ = _create_bucket_if_doesnt_exist ('eu-west-1' , custom_bucket_name )
103106 bucket = _create_bucket_if_doesnt_exist ('eu-west-1' , custom_bucket_name )
104107 bucket .delete ()
108+
109+
110+ def test_sagemaker_default_config_location ():
111+ f"""
112+ See: https://sagemaker.readthedocs.io/en/stable/overview.html#default-configuration-file-location
113+ See: { sagemaker .config .config_schema .SAGEMAKER_PYTHON_SDK_CONFIG_SCHEMA }
114+ """
115+ import os
116+ from platformdirs import site_config_dir , user_config_dir
117+
118+ # Prints the location of the admin config file
119+ logging .info (os .path .join (site_config_dir ("sagemaker" ), "config.yaml" ))
120+
121+ # Prints the location of the user config file
122+ logging .info (os .path .join (user_config_dir ("sagemaker" ), "config.yaml" ))
You can’t perform that action at this time.
0 commit comments