Skip to content

Conversation

zpcore
Copy link
Member

@zpcore zpcore commented Aug 8, 2024

Update batch_size in the metric report after loading the model.

@zpcore zpcore marked this pull request as ready for review August 8, 2024 23:13
@zpcore zpcore requested review from qihqi and ysiraichi August 8, 2024 23:16

# real batch_size can be updated after load_model, need to update
# so the config can be reflected in the report.
experiment_config['batch_size'] = experiment.batch_size
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be better if we move this to the main thread, so that Run with --model-config=.... logs also reflect in that batch size?

Copy link
Member Author

Choose a reason for hiding this comment

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

My concern is that moving this to the main thread will not update the batch_size if we run with the single test command for example:

python experiment_runner.py \
--suite-name=torchbench \
--experiment-config='{"accelerator":"TPU","xla":"PJRT","dynamo":"openxla","test":"eval","torch_xla2":null,"xla_flags":null,"keep_model_data_on_cuda":0}' \
--model-config='{"model_name":"BERT_pytorch"}'

In this case, the report is still bach_size:None.

@zpcore zpcore requested a review from ysiraichi August 9, 2024 17:15
@zpcore zpcore merged commit f0bbaeb into master Aug 12, 2024
@zpcore zpcore deleted the piz/fix_zero_success branch August 12, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants