-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
Add: mlflow for experiment tracking #1059
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
95ff2b9
Update requirements.txt
JohanWork 8161937
Update __init__.py
JohanWork 8ce2780
Update README.md
JohanWork bea9a47
Create mlflow_.py (#1)
JohanWork 63e41ea
Update README.md
JohanWork f2fdc3a
fix precommits
JohanWork f04da39
Merge branch 'OpenAccess-AI-Collective:main' into adding-mlflow
JohanWork 9fe5420
Update README.md
JohanWork f4c35d8
Update trainer_builder.py
JohanWork e7120e5
chore: lint
winglian 1086683
make ternary a bit more readable
winglian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ hf_transfer | |
colorama | ||
numba | ||
numpy>=1.24.4 | ||
mlflow | ||
# qlora things | ||
bert-score==0.3.13 | ||
evaluate==0.4.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Module for mlflow utilities""" | ||
|
||
import os | ||
|
||
from axolotl.utils.dict import DictDefault | ||
|
||
|
||
def setup_mlflow_env_vars(cfg: DictDefault): | ||
for key in cfg.keys(): | ||
if key.startswith("mlflow_"): | ||
value = cfg.get(key, "") | ||
|
||
if value and isinstance(value, str) and len(value) > 0: | ||
os.environ[key.upper()] = value | ||
|
||
# Enable mlflow if experiment name is present | ||
if cfg.mlflow_experiment_name and len(cfg.mlflow_experiment_name) > 0: | ||
cfg.use_mlflow = True |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It might be worth logging a warning when this is set but the uri env isnt.
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.
Wouldn't it be better to make a config
mlflow_tracking_uri:
? The parsing code should be able to set that if needed.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.
I agree with what you propose @NanoCode012 . Have update the code.