#NEWLINE# def publish_results( exp_name , results_dir ) : #NEWLINE# #INDENT# import logging #NEWLINE# log = logging . getLogger ( 'sts.exp_lifecycle' ) #NEWLINE# res_git_dir = find_git_dir ( results_dir ) #NEWLINE# rel_results_dir = os . path . relpath ( res_git_dir , res_git_dir ) #NEWLINE# log . info ( ( 'Publishing results to git dir ' + res_git_dir ) ) #NEWLINE# system ( ( 'git add %s' % rel_results_dir ) , cwd = res_git_dir ) #NEWLINE# system ( ( "git commit -m '%s'" % exp_name ) , cwd = res_git_dir ) #NEWLINE# system ( 'git pull --rebase' , cwd = res_git_dir ) #NEWLINE# system ( 'git push' , cwd = res_git_dir )