File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
sagemaker-core/src/sagemaker/core Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 2323NOTEBOOK_METADATA_FILE = "/etc/opt/ml/sagemaker-notebook-instance-version.txt"
2424STUDIO_METADATA_FILE = "/opt/ml/metadata/resource-metadata.json"
2525
26- SDK_VERSION = 1.0
26+ def _get_sdk_version ():
27+ """Read SDK version from VERSION file"""
28+ current_dir = os .path .dirname (os .path .abspath (__file__ ))
29+ repo_root = os .path .normpath (os .path .join (current_dir , '../../../..' ))
30+ version_file_path = os .path .join (repo_root , 'VERSION' )
31+ try :
32+ with open (version_file_path , 'r' ) as f :
33+ return f .read ().strip ()
34+ except (FileNotFoundError , IOError ):
35+ return "3.0" # fallback version
36+
37+ SDK_VERSION = _get_sdk_version ()
2738
2839
2940def process_notebook_metadata_file ():
You can’t perform that action at this time.
0 commit comments