Skip to content

Commit

Permalink
#104: Added get_language_definition to the language container deployer (
Browse files Browse the repository at this point in the history
  • Loading branch information
tkilias authored Jan 5, 2024
1 parent 1e717bf commit 729e832
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 134 deletions.
23 changes: 23 additions & 0 deletions doc/changes/changes_0.7.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SageMaker Extension 0.7.0, released 2024-01-05

Code name: Get Language Definition in LanguageContainerDeployer

## Summary

This release added the get_language_definition function to the LanguageContainerDeployer.

### Features

- #104: Added get_language_definition to the language container deployer

### Bug Fixes

n/a

### Documentation

n/a

### Refactoring

n/a
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ def _update_previous_language_settings(self, alter_type: LanguageActivationLevel
path_in_udf, prev_lang_aliases)
return new_definitions_str

def get_language_definition(self, bucket_file_path: str):
"""
Generate a language definition (ALIAS=URL) for the specified bucket file path.
bucket_file_path - Path within the designated bucket where the container is uploaded.
"""
path_in_udf = self._bucketfs_location.generate_bucket_udf_path(bucket_file_path)
result = self._generate_new_language_settings(path_in_udf=path_in_udf, prev_lang_aliases=[])
return result

def _generate_new_language_settings(self, path_in_udf: PurePosixPath,
prev_lang_aliases: List[str]) -> str:
other_definitions = [
Expand Down
Loading

0 comments on commit 729e832

Please sign in to comment.