Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M metaseq
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • metaseq
  • Merge requests
  • !513

[qol] Slightly prettier logging.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge nicelogs into main 2 years ago
  • Overview 5
  • Commits 5
  • Pipelines 0
  • Changes 1

Created by: stephenroller

Patch Description Opinionated formatting change in response to the logging changes in #473.

Testing steps Launched to make sure it looked good.

Compare
  • main (base)

and
  • latest version
    6a6a426f
    5 commits, 2 years ago

1 file
+ 8
- 1

    Preferences

    File browser
    Compare changes
metaseq/cli/train.py
+ 8
- 1
  • View file @ 6a6a426f


@@ -18,6 +18,7 @@ import sys
import time
import socket
import re
from datetime import datetime
from typing import Dict, Optional, Any, List, Tuple, Callable
import numpy as np
@@ -40,8 +41,11 @@ from metaseq.logging import meters, metrics, progress_bar
from metaseq.model_parallel.megatron_trainer import MegatronTrainer
from metaseq.trainer import Trainer
rank = int(os.environ.get('SLURM_PROCID', 0))
hostname = socket.gethostname()
fmtstr = f"%(asctime)s | {rank:04d} {hostname} %(levelname)s | %(name)s | %(message)s"
logging.basicConfig(
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
format=fmtstr,
datefmt="%Y-%m-%d %H:%M:%S",
level=os.environ.get("LOGLEVEL", "INFO").upper(),
stream=sys.stdout,
@@ -51,6 +55,9 @@ logger = logging.getLogger("metaseq.cli.train")
def main(cfg: DictConfig) -> None:
if distributed_utils.is_master(cfg.distributed_training):
sys.stdout.write(f"START: Beginning run at {datetime.now()}\n")
sys.stderr.write(f"START: Beginning run at {datetime.now()}\n")
utils.import_user_module(cfg.common)
# replace with actual job id
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
cla signed
1
cla signed
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: root/metaseq!513
Source branch: nicelogs

Menu

Explore Projects Groups Snippets