Skip to content

Commit

Permalink
[feat] attempt at push to hugging face method
Browse files Browse the repository at this point in the history
  • Loading branch information
ctr26 committed Sep 30, 2024
1 parent 5458c62 commit d30ec91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bioimage_embed/lightning/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def __init__(self, model, args=SimpleNamespace()):
# self.args = SimpleNamespace(**{**merged_kwargs, **vars(self.args)})
self.save_hyperparameters(vars(self.args))
# self.model.train()


def push_to_hf_hub(self, *args, **kwargs):
return self.model.push_to_hf_hub(*args, **kwargs)

def forward(self, batch):
x = self.batch_to_tensor(batch)
return ModelOutput(x=x, out=self.model(x))
Expand Down

0 comments on commit d30ec91

Please sign in to comment.