Integrate with TensorFlow Model Analysis¶
Comet integrates with TensorFlow Model Analysis.
If you're already using TensorFlow and TensorFlow Model Analysis (TFMA), then Comet works with no further customization. Just add these lines of code to your training script:
import os
os.environ["COMET_AUTO_LOG_TFMA"] = "1"
from comet_ml import start, login
import tensorflow_model_analysis as tfma
login()
experiment = start(project_name="comet-example-tfma-doc")
# Your TFMA code:
results = tfma.load_eval_result("/path/to/results")
tfma.view.render_slicing_metrics(results)
tfma.view.render_slicing_metrics(results, 'a_column')
tfma.view.render_plot(results)
tfma.view.render_time_series(results)
That's it for logging the results!
To see them in the Comet UI, you can use the custom TFMA Viewer Panel at either the Project View, or the Experiment View.
Summary¶
To use TFMA with Comet, perform the followig steps:
- Set the Comet configuration variable "COMET_AUTO_LOG_TFMA" to "1".
- Create a Comet Experiment().
- Render your TFMA results as normal.
- See results in your experiment asset, and the custom "TFMA Viewer" panel.
Try it out!¶
Here's an example for using Comet with TensorFlow Model Analysis.
Learn more¶
Nov. 18, 2024