Skip to content

Conversation

@avantikalal
Copy link
Collaborator

No description provided.

@gokceneraslan
Copy link
Collaborator

How about something like def load_model(project, model_name, device, alias='latest', checkpoint_file='model.ckpt') 1) Name is more familiar, map_location is trickier. 2) User has to specify there to load it so if there is no GPU, it can be CPU.

@avantikalal
Copy link
Collaborator Author

How about something like def load_model(project, model_name, device, alias='latest', checkpoint_file='model.ckpt') 1) Name is more familiar, map_location is trickier. 2) User has to specify there to load it so if there is no GPU, it can be CPU.

Done! On second thought I decided to make cpu the default since the functions most users will be using later (predict_on_dataset, embed_on_dataset) take care of moving the model to GPU.

@gokceneraslan
Copy link
Collaborator

Sounds good

@avantikalal avantikalal merged commit f349d29 into main Jul 17, 2024
@avantikalal avantikalal deleted the map-location branch July 17, 2024 22:56
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