Skip to content

Commit

Permalink
Merge branch 'main' into tp-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eitanturok authored Sep 20, 2024
2 parents 3257430 + 129dcbe commit b3e2614
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion composer/utils/remote_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def upload_file(retry_index: int = 0):
# Good! It shouldn't exist.
pass
else:
raise FileExistsError(f'Object {remote_file_name} already exists, but overwrite was set to False.')
raise FileExistsError(
f'Object {remote_file_name} already exists, but overwrite was set to False. '
'Please set `save_overwrite` to `True` in Trainer to overwrite the existing file.',
)
log.info(f'Uploading file {local_file_path} to {remote_file_name}')
object_store.upload_object(
object_name=remote_file_name,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def package_files(prefix: str, directory: str, extension: str):
]

extra_deps['wandb'] = [
'wandb>=0.13.2,<0.18',
'wandb>=0.13.2,<0.19',
]

extra_deps['comet_ml'] = [
Expand Down
4 changes: 2 additions & 2 deletions tests/loggers/test_wandb_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ def test_wandb_log_metrics(test_wandb_logger):
eval_metrics_cross_entropy_count = all_run_text.count('metrics/eval/CrossEntropy')
train_loss_count = all_run_text.count('loss/train/total')

expected_number_train_loss_count = (dataset_size / batch_size) + 1 # wandb includes it in the file one extra time
expected_number_train_loss_count = (dataset_size / batch_size) * 2 # wandb includes it twice per step
expected_number_train_metrics_count = (
dataset_size / batch_size
) + 2 # wandb includes it in the file two extra times
) * 2 + 2 # wandb includes it twice per step plus two extra times
expected_number_eval_metrics_count = 2 # wandb includes it in the file twice
assert train_metrics_accuracy_count == expected_number_train_metrics_count
assert train_loss_count == expected_number_train_loss_count
Expand Down

0 comments on commit b3e2614

Please sign in to comment.