Skip to content

Gitlab & Hugging Face load support - #319

Merged
samueljackson92 merged 85 commits into
devfrom
wk9874/models/hf_load_support
Aug 14, 2026
Merged

Gitlab & Hugging Face load support#319
samueljackson92 merged 85 commits into
devfrom
wk9874/models/hf_load_support

Conversation

@wk9874

@wk9874 wk9874 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Initial commit adding Gitlab & HF Load Support

Not 100% happy with the UI elements, lots of repetition and I'm sure it can be tidied.

Gitlab loading doesn't work on UKAEA instance since its on too old of a version, I hope this will be bumped fairly soon so I can finish that part & test

Hugging Face loading works, added a temporary YOLOv8 implementation into api/models/temp.py which can be used to test. This whole file should be removed before this PR is merged

Can take an initial look at the implementation if you get time @samueljackson92 / @abdullah-ukaea , and then I can respond to comments when I'm back from AL

TODOs:

  • Safe tensors limiting
  • Move Gitlab / HF settings to their own subheadings
  • Tests

@wk9874
wk9874 marked this pull request as draft July 7, 2026 17:02
@wk9874
wk9874 requested a review from samueljackson92 July 7, 2026 17:02
@wk9874

wk9874 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

@praksharma also one for you to look at to see how best to integrate it with your HF model recipes stuff! I'm hoping that effectively the dummy YOLO model implementation I have in api/models/temp.py would be replaced by your generalised HF / YOLO models?

@wk9874
wk9874 requested a review from praksharma July 8, 2026 08:00
@wk9874
wk9874 requested a review from samueljackson92 August 12, 2026 11:18

@samueljackson92 samueljackson92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me and works!

@samueljackson92 samueljackson92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually I just spotted that i get the weights file dumped in the local folder where I ran toktagger? Surely it should be in a cache folder?

@wk9874

wk9874 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

Actually I just spotted that i get the weights file dumped in the local folder where I ran toktagger? Surely it should be in a cache folder?

This was an error in the temp YOLO implementation rather than the actual loading code - define_model had YOLO("yolov8n"), which means that whenever the model class was instantiated, that ran, and YOLO automatically downloaded the weights to the CWD.

Have fixed it, can you double check it works now pls?

@praksharma

Copy link
Copy Markdown
Member

Actually I just spotted that i get the weights file dumped in the local folder where I ran toktagger? Surely it should be in a cache folder?

This was an error in the temp YOLO implementation rather than the actual loading code - define_model had YOLO("yolov8n"), which means that whenever the model class was instantiated, that ran, and YOLO automatically downloaded the weights to the CWD.

Have fixed it, can you double check it works now pls?

It looks to similar to #326 (comment). Not sure if you tested it on NVIDIA GPU.

@samueljackson92

Copy link
Copy Markdown
Contributor

Working nicely now. Just merged the dev to get the uv.lock conflict fixed. Should be good to go after the CI passes.

@samueljackson92
samueljackson92 merged commit aa25dd1 into dev Aug 14, 2026
6 checks passed
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