Skip to content

Conversation

@lessw2020
Copy link
Contributor

Current console output is a sea of white.
Added very simple color and style dataclass in utils, so we (or future users) can enable more informative (and fun) console outputs.

current:
Screenshot 2024-02-23 at 3 15 05 PM

after (not necessarily the 'final' color scheme, just showing the difference here):
Screenshot 2024-02-23 at 2 56 43 PM

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 23, 2024
@lessw2020
Copy link
Contributor Author

lint issue is related to new CI rather than pr.

Copy link

@yifuwang yifuwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good!

train.py Outdated
model_name = job_config.model.name
rank0_log(f"Building {model_name}")
model_name = job_config.model
rank0_log(f"{color.yellow} Building {model_name} {color.reset}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, but maybe consider checking if we are being redirected when applying color to avoid '\033[33m' in logs w/ MAST/SLURM.

os.isatty(sys.stdout.fileno())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, thanks for flagging this Yifu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants