-
Notifications
You must be signed in to change notification settings - Fork 84
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
Train use mlflow #287
base: main
Are you sure you want to change the base?
Train use mlflow #287
Conversation
@@ -0,0 +1,32 @@ | |||
version: '3.9' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add these ROOT/docker/docker-compose.nlu.yml and ROOT/docker/docker-compose.nlu.dev.yml
nlu/docker-compose.yml
Outdated
ports: | ||
- "5002:5000" # Expose MLflow UI | ||
volumes: | ||
- ./mlruns:/mlruns # Mount local directory for MLflow artifacts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ./mlruns:/mlruns # Mount local directory for MLflow artifacts | |
- mlruns:/mlruns # Mount local directory for MLflow artifacts |
Add "mlruns:" to the volumes
nlu/models/intent_classifier.py
Outdated
@@ -34,6 +36,7 @@ | |||
'fr': "dbmdz/bert-base-french-europeana-cased", | |||
} | |||
|
|||
mlflow.set_tracking_uri("http://0.0.0.0:5002") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mlflow.set_tracking_uri("http://0.0.0.0:5002") | |
mlflow.set_tracking_uri("http://0.0.0.0:5002") |
This should be the docker hostname
self.save() | ||
|
||
# Start MLflow run | ||
with mlflow.start_run() as run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be implement in the parent class so that it would work for all models ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally it should be implemented as a helper class. Otherwise, we're logging metrics during training. The base class doesn't have a fit method.
@@ -96,7 +96,7 @@ | |||
if os.path.isfile(os.path.join(model.save_dir, "checkpoint")): | |||
model.restore() | |||
else: | |||
model.save() | |||
model.save_model() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need to rename this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid confusion with keras' built-in save method. It's been throwing aberrant exceptions. Solved it by renaming the boilerplate method
Motivation
This PR modifies the training process of intent classifier models in order to be able to expose the Mlflow UI and log metrics/artifacts/registered models there.
Type of change:
Please delete options that are not relevant.
Checklist: