Skip to content

Conversation

mart-r
Copy link
Collaborator

@mart-r mart-r commented Oct 3, 2025

This is a 2 parter:

1 - new API designed for remote dens

This PR adds optional API that's designed for use with a remote den. The API is not available for local dens.

This API is designed to make all the processing (either fine-tuning or metrics / eval) to happen on the remote.

The imagined workflow would look something like that:

den: Den  # some remote den
model_info = den.list_available_models()[0]  # the info corresponding to model of interest
data = get_data()  # get the data or project IDs
# fine tune
den.finetune_model(model_info, data)
# OR eval
den.evaluate_model(model_info, data)
# the work is done remotely, model is never local to the user

2 - new config options designed for use with remote dens

With remote dens, you generally don't want the user to fine tuning and/or evaluation locally.
Instead, you want this to be done on the remote den so that the experiments can be kept track of.

So this PR adds a few config options / environmental variables (that only affect remote dens):

Environmetnal variable name Values Description Comments
MEDCAT_DEN_REMOTE_ALLOW_PUSH_FINETUNED bool Whether to allow locallly fine tuned model to be pushed to remote dens Defaults to False
MEDCAT_DEN_REMOTE_ALLOW_LOCAL_FINE_TUNE bool Whether to allow local fine tuning for remote dens Defaults to False

So by default, a remote den will not allow local fine-tuning or pushing of a fine-tuned model back to the remote. However, this behaviour can be changed if/when needed. This generally does not affect new models which should still be able to be pushed to the remote den.

@tomolopolis
Copy link
Member

mart-r added 2 commits October 3, 2025 16:50
That is, needed to make sure it is explicitly specced for the protocol for the instanceof check to pass
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.

2 participants