Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

eval.py 654 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  1. from . import shared
  2. def predict_test_set():
  3. print("Loading test data")
  4. X, y = shared.load_data_and_labels(shared.test_processed)
  5. print("Done")
  6. clf = shared.load(shared.classifier_pkl)
  7. preds = clf.predict(X.sparse.to_coo())
  8. return y, preds, clf, shared.compute_metrics(y, preds, "test")
  9. def main():
  10. y, preds, clf, metrics = predict_test_set()
  11. from dagshub import dagshub_logger
  12. with dagshub_logger(metrics_path='test-metrics.csv', should_log_hparams=False) as logger:
  13. logger.log_metrics(metrics)
  14. # For possible interactive use
  15. return y, preds, clf, metrics
  16. if __name__ == "__main__":
  17. main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...