Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No device and batch size selection during eval #322

Open
abmazitov opened this issue Jul 27, 2024 · 0 comments
Open

No device and batch size selection during eval #322

abmazitov opened this issue Jul 27, 2024 · 0 comments
Assignees
Labels
Infrastructure: CLI Related to the command line interface Priority: Medium Important issues to address after high priority.

Comments

@abmazitov
Copy link
Contributor

abmazitov commented Jul 27, 2024

Current implementation of the mtt eval forces the model to run on the CPU only. This is caused by a recent metatensor/metatensor#668 PR, where the model is forced to be saved with a CPU device, and the following lines in the eval script

# Infer the device and dtype from the model
model_tensor = next(itertools.chain(model.parameters(), model.buffers()))
dtype = model_tensor.dtype
device = model_tensor.device

where device is inherited from the model parameters. Batch size selection is also not available, since it is hardcoded to be equal to 1.

# Create a dataloader
dataloader = torch.utils.data.DataLoader(
    dataset,
    batch_size=1,  # TODO: allow to set from outside!!
    collate_fn=collate_fn,
    shuffle=False,
)

Therefore, the evaluation part of the MTT is now extremely slow and rigid.

@abmazitov abmazitov added the Infrastructure: CLI Related to the command line interface label Jul 27, 2024
@abmazitov abmazitov self-assigned this Jul 27, 2024
@frostedoyster frostedoyster added the Priority: Medium Important issues to address after high priority. label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure: CLI Related to the command line interface Priority: Medium Important issues to address after high priority.
Projects
None yet
Development

No branches or pull requests

2 participants