Skip to content

Commit

Permalink
removed wandb config
Browse files Browse the repository at this point in the history
  • Loading branch information
egorkrash committed Sep 27, 2023
1 parent e8a10ea commit c088537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ Get started with the codebase by following the steps below:
```bash
export PYTHONPATH="$PWD:${PYTHONPATH}"
```
- **Step 4 (optional)**: To use with `wandb`:
```bash
wandb login
```
and
```bash
wandb init --entity=your-entity --project=your-project
```

#### 2. Clone Repository:

Expand Down
7 changes: 1 addition & 6 deletions src/train_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
from utils.logger import setup_logger

logger = setup_logger(__name__)
wandb_config = {'project': 'internalization',
'entity': 'assistance-llms',
'notes': os.environ.get('SLURM_JOB_ID', 'local')}



def train(raw_datasets, args):
Expand Down Expand Up @@ -62,7 +58,7 @@ def train(raw_datasets, args):
# trainer.hyperparameter_search inits wandb itself.
if not training_args.do_sweeps:
group, exp_name = training_args.output_dir.replace('experiments/', '').split('/')
wandb.init(group=group, name=exp_name, **wandb_config)
wandb.init(group=group, name=exp_name)

# Detecting last checkpoint.
last_checkpoint = None
Expand Down Expand Up @@ -364,7 +360,6 @@ def compute_objective(metrics: Dict[str, float]) -> float:
n_trials=training_args.n_sweeps,
save_metrics=True,
compute_objective=compute_objective,
**wandb_config
)
logger.info(best_run)

Expand Down

0 comments on commit c088537

Please sign in to comment.