Skip to content

Commit 3d82d8f

Browse files
authored
change: remove red from possible colors when streaming logs (#1121)
This change also adds a workaround in tox.ini to handle boto/botocore@e87e7a7
1 parent b0201c5 commit 3d82d8f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/sagemaker/logs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -31,7 +31,9 @@ class ColorWrap(object):
3131
cell).
3232
"""
3333

34-
_stream_colors = [31, 32, 33, 34, 35, 36]
34+
# For what color each number represents, see
35+
# https://misc.flogisoft.com/bash/tip_colors_and_formatting#colors
36+
_stream_colors = [34, 35, 32, 36, 33]
3537

3638
def __init__(self, force=False):
3739
"""Initialize the class.

tox.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ passenv =
5757

5858
# {posargs} can be passed in by additional arguments specified when invoking tox.
5959
# Can be used to specify which tests to run, e.g.: tox -- -s
60+
# TODO: Remove pip install python-dateutil==2.8.0 once botocore no longer requires a pinned version
6061
commands =
62+
pip install python-dateutil==2.8.0
6163
coverage run --source sagemaker -m pytest {posargs}
6264
{env:IGNORE_COVERAGE:} coverage report --fail-under=90 --omit */tensorflow/tensorflow_serving/*
6365
extras = test
@@ -112,7 +114,9 @@ deps =
112114
# pip install requirements.txt is separate as RTD does it in separate steps
113115
# having the requirements.txt installed in deps above results in Double Requirement exception
114116
# https://github.com/pypa/pip/issues/988
117+
# TODO: Remove pip install python-dateutil==2.8.0 once botocore no longer requires a pinned version
115118
commands =
119+
pip install python-dateutil==2.8.0
116120
pip install --exists-action=w -r requirements.txt
117121
sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html
118122

0 commit comments

Comments
 (0)