mirror of
https://github.com/velocitatem/PHANTOM.git
synced 2026-05-31 16:43:36 +00:00
chore: e2e is done with new pipeline
This commit is contained in:
@@ -26,8 +26,12 @@ class ElasticityBasedPricer(PricingFunction):
|
||||
raise ValueError("historical_data must contain 'elasticity' column")
|
||||
|
||||
self.elasticity = historical_data['elasticity'].values
|
||||
self.base_prices = historical_data.get('base_price', np.ones(len(historical_data)) * 100).values
|
||||
self.mean_demand = historical_data.get('mean_demand', np.ones(len(historical_data)) * 10).values
|
||||
self.base_prices = (historical_data['base_price'].values
|
||||
if 'base_price' in historical_data.columns
|
||||
else np.ones(len(historical_data)) * 100)
|
||||
self.mean_demand = (historical_data['mean_demand'].values
|
||||
if 'mean_demand' in historical_data.columns
|
||||
else np.ones(len(historical_data)) * 10)
|
||||
return self
|
||||
|
||||
def predict(self, state_space) -> np.ndarray:
|
||||
|
||||
@@ -4,6 +4,7 @@ import requests
|
||||
from typing import List
|
||||
from supabase import create_client, Client
|
||||
from procesing.providers.base import DataProvider
|
||||
from dotenv import load_dotenv
|
||||
|
||||
class SupabaseProvider(DataProvider):
|
||||
"""Concrete Supabase + backend API implementation"""
|
||||
@@ -11,6 +12,7 @@ class SupabaseProvider(DataProvider):
|
||||
def __init__(self,
|
||||
supabase_url: str = None,
|
||||
supabase_key: str = None,):
|
||||
load_dotenv()
|
||||
self.supabase_url = supabase_url or os.getenv("NEXT_PUBLIC_SUPABASE_URL")
|
||||
self.supabase_key = supabase_key or os.getenv("NEXT_PUBLIC_SUPABASE_ANON_KEY")
|
||||
self.supabase: Client = create_client(self.supabase_url, self.supabase_key)
|
||||
|
||||
Reference in New Issue
Block a user