Skip to content

Instantly share code, notes, and snippets.

@maxbrenner-ai
Created August 25, 2020 18:21
Show Gist options
  • Save maxbrenner-ai/6d27a7c73cca751e0912180b0e73b97e to your computer and use it in GitHub Desktop.
Save maxbrenner-ai/6d27a7c73cca751e0912180b0e73b97e to your computer and use it in GitHub Desktop.
docker model train script
prefix = '/opt/ml/'
input_path = prefix + 'input/data'
output_path = os.path.join(prefix, 'output')
model_path = os.path.join(prefix, 'model')
# The function to execute the training.
def train():
print('\nStarting the training.')
with open(os.path.join(model_path, 'model'), 'w') as f:
f.write('dummy model params');
print('Training complete.')
if __name__ == '__main__':
train()
sys.exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment