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

models.py 266 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
  1. import json
  2. from pydantic import BaseModel
  3. class PredictionStats(BaseModel):
  4. fraction: float
  5. model_name: str
  6. model_type: str
  7. elapsed: float
  8. def predictionstats_to_str(stats: PredictionStats):
  9. return json.loads(stats.json(), parse_float=str)
Tip!

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

Comments

Loading...