Closed the-praxs closed 2 months ago
Try running update_prices.py
Works but also throws an exception for max_input_tokens
on line 36
Traceback (most recent call last):
File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <module>
df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x))
File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/series.py", line 4917, in apply
return SeriesApply(
File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1427, in apply
return self.apply_standard()
File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1507, in apply_standard
mapped = obj._map_values(
File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/base.py", line 921, in _map_values
return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/algorithms.py", line 1743, in map_array
return lib.map_infer(values, mapper, convert=convert)
File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <lambda>
df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x))
ValueError: Unknown format code 'f' for object of type 'str'
Works but also throws an exception for
max_input_tokens
on line 36Traceback (most recent call last): File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <module> df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x)) File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/series.py", line 4917, in apply return SeriesApply( File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1427, in apply return self.apply_standard() File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1507, in apply_standard mapped = obj._map_values( File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/base.py", line 921, in _map_values return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert) File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/algorithms.py", line 1743, in map_array return lib.map_infer(values, mapper, convert=convert) File "lib.pyx", line 2972, in pandas._libs.lib.map_infer File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <lambda> df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x)) ValueError: Unknown format code 'f' for object of type 'str'
Found the culprit - missing values.
How are these values retrieved in the first place?
Jamba 1.5 mini and large models pricing are missing and should be added here.