-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feature: add git_config and git_clone, validate method #832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
10d27c5
add git_config and validate method
db8652c
Merge branch 'master' of github.com:aws/sagemaker-python-sdk into clo…
6b78ed4
modify the order of git_config, add tests
e59bb79
move validate_git_config, add integ test
7808faa
modify location _git_clone_code called
2783c4a
add documentation
db3b69f
Merge branch 'master' of github.com:aws/sagemaker-python-sdk into clo…
f397850
Update doc/overview.rst
GaryTu1020 5b8d684
Update doc/overview.rst
GaryTu1020 a9e2932
add more integ tests
241ac92
write unit tests for git_utils
a81859a
fix conflict on overview.rst
c39c344
delete a line
068a7b1
modify an assertion in test_with_mxnet
2b1622b
add assertion to some test functions
28a5c58
remove deploy part in test_git
0797060
change testing git repo
e2e5c20
change the testing repo
c6daa5d
correct an error message
e8bede0
pull master
e5bd806
stop patching private methods
c1bae10
modified overview.rst, add lock for tests
2af9b24
slight change to overview.rst
e15a22d
Merge branch 'master' into clone_from_github
chuyang-deng b102563
add a comment for lock
9ae910e
merge with remote branch
3383bfc
Merge branch 'master' into clone_from_github
GaryTu1020 9a7f4e1
Merge branch 'master' into clone_from_github
chuyang-deng d4bb0bb
merge with master
e6a01f0
merge with master
0c5e32b
merge aws master
b6e75d0
merge with master
3621bd4
merge with master
c7af978
merge with aws master
c2f7a43
merge with aws master
0790f41
Merge branch 'master' into clone_from_github
mvsusp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -596,6 +596,19 @@ def test_prepare_for_training_force_name_generation(strftime, sagemaker_session) | |
assert JOB_NAME == fw._current_job_name | ||
|
||
|
||
def test_git_clone_code_succeed(sagemaker_session): | ||
git_config = {'repo': 'https://github.com/GaryTu1020/python-sdk-testing.git', | ||
'branch': 'branch1', | ||
'commit': 'aea6f3acef9619f77f94772d9d654f041e16bf49'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here (global variables.) |
||
fw = DummyFramework(entry_point='source_dir/entry_point', git_config=git_config, | ||
source_dir='source_dir', role=ROLE, sagemaker_session=sagemaker_session, | ||
train_instance_count=INSTANCE_COUNT, train_instance_type=INSTANCE_TYPE, | ||
enable_cloudwatch_metrics=True) | ||
fw._git_clone_code() | ||
GaryTu1020 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
assert os.path.isfile(fw.entry_point) | ||
assert os.path.isdir(fw.source_dir) | ||
|
||
|
||
@patch('time.strftime', return_value=TIMESTAMP) | ||
def test_init_with_source_dir_s3(strftime, sagemaker_session): | ||
fw = DummyFramework(entry_point=SCRIPT_PATH, source_dir='s3://location', role=ROLE, | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.