Skip to content

Commit

Permalink
virtual record should use supplied perf, cost (#1266)
Browse files Browse the repository at this point in the history
* virtual record should use supplied perf, cost

* fmt
  • Loading branch information
sfc-gh-chu authored Jun 27, 2024
1 parent 65828bd commit 26848c6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions trulens_eval/trulens_eval/tru_virtual.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,10 @@ def __init__(
if (end_time - start_time).total_seconds() == 0.0:
end_time += datetime.timedelta(microseconds=1)

if "cost" not in kwargs:
kwargs['cost'] = mod_base_schema.Cost()
if "perf" not in kwargs:
kwargs['perf'] = mod_base_schema.Perf(
start_time=start_time, end_time=end_time
)
kwargs['cost'] = cost or mod_base_schema.Cost()
kwargs['perf'] = perf or mod_base_schema.Perf(
start_time=start_time, end_time=end_time
)

if "main_input" not in kwargs:
kwargs['main_input'] = "No main_input provided."
Expand Down

0 comments on commit 26848c6

Please sign in to comment.