major scoring implementation, major frontend work

This commit is contained in:
2024-12-14 01:05:26 -06:00
parent 6f0b2050ad
commit 7fc5980e3b
15 changed files with 541 additions and 75 deletions

View File

@@ -101,67 +101,78 @@ type Instance struct {
}
type Offer struct {
IsBid bool `json:"is_bid"`
InetUpBilled *float64 `json:"inet_up_billed"`
InetDownBilled *float64 `json:"inet_down_billed"`
External bool `json:"external"`
Webpage *string `json:"webpage"`
Logo string `json:"logo"`
Rentable bool `json:"rentable"`
ComputeCap int `json:"compute_cap"`
DriverVersion string `json:"driver_version"`
CudaMaxGood float64 `json:"cuda_max_good"`
MachineID int `json:"machine_id"`
HostingType *float64 `json:"hosting_type"`
PublicIPAddr string `json:"public_ipaddr"`
Geolocation string `json:"geolocation"`
Geocode *int64 `json:"geolocode"`
FlopsPerDPHTotal float64 `json:"flops_per_dphtotal"`
DLPerfPerDPHTotal float64 `json:"dlperf_per_dphtotal"`
Reliability2 float64 `json:"reliability2"`
HostRunTime int `json:"host_run_time"`
HostID int `json:"host_id"`
ID int `json:"id"`
BundleID int `json:"bundle_id"`
NumGPUs int `json:"num_gpus"`
TotalFlops float64 `json:"total_flops"`
MinBid float64 `json:"min_bid"`
DPHBase float64 `json:"dph_base"`
DPHTotal float64 `json:"dph_total"`
GPUName string `json:"gpu_name"`
GPURam int `json:"gpu_ram"`
GPUDisplayActive bool `json:"gpu_display_active"`
GPUMemBw float64 `json:"gpu_mem_bw"`
BwNVLink float64 `json:"bw_nvlink"`
DirectPortCount int `json:"direct_port_count"`
GPULanes int `json:"gpu_lanes"`
PCIeBw float64 `json:"pcie_bw"`
PCIGen float64 `json:"pci_gen"`
DLPerf float64 `json:"dlperf"`
CPUName string `json:"cpu_name"`
MoboName string `json:"mobo_name"`
CPURam int `json:"cpu_ram"`
CPUCores float64 `json:"cpu_cores"`
CPUCoresEffective float64 `json:"cpu_cores_effective"`
GPUFrac float64 `json:"gpu_frac"`
HasAVX int `json:"has_avx"`
DiskSpace float64 `json:"disk_space"`
DiskName string `json:"disk_name"`
DiskBw float64 `json:"disk_bw"`
InetUp float64 `json:"inet_up"`
InetDown float64 `json:"inet_down"`
StartDate float64 `json:"start_date"`
EndDate *float64 `json:"end_date"`
Duration *float64 `json:"duration"`
StorageCost float64 `json:"storage_cost"`
InetUpCost float64 `json:"inet_up_cost"`
InetDownCost float64 `json:"inet_down_cost"`
StorageTotalCost float64 `json:"storage_total_cost"`
Verification string `json:"verification"`
Score float64 `json:"score"`
Rented bool `json:"rented"`
BundledResults int `json:"bundled_results"`
PendingCount int `json:"pending_count"`
IsBid bool `json:"is_bid"`
InetUpBilled *float64 `json:"inet_up_billed"`
InetDownBilled *float64 `json:"inet_down_billed"`
External bool `json:"external"`
Webpage *string `json:"webpage"`
Logo string `json:"logo"`
Rentable bool `json:"rentable"`
ComputeCap int `json:"compute_cap"`
DriverVersion string `json:"driver_version"`
CudaMaxGood float64 `json:"cuda_max_good"`
MachineID int `json:"machine_id"`
HostingType *float64 `json:"hosting_type"`
PublicIPAddr string `json:"public_ipaddr"`
Geolocation string `json:"geolocation"`
Geocode *int64 `json:"geolocode"`
FlopsPerDPHTotal float64 `json:"flops_per_dphtotal"`
DLPerfPerDPHTotal float64 `json:"dlperf_per_dphtotal"`
Reliability2 float64 `json:"reliability2"`
HostRunTime int `json:"host_run_time"`
HostID int `json:"host_id"`
ID int `json:"id"`
BundleID int `json:"bundle_id"`
NumGPUs int `json:"num_gpus"`
TotalFlops float64 `json:"total_flops"`
MinBid float64 `json:"min_bid"`
DPHBase float64 `json:"dph_base"`
DPHTotal float64 `json:"dph_total"`
GPUName string `json:"gpu_name"`
GPUArch string `json:"gpu_arch"`
GPURam int `json:"gpu_ram"`
GPUDisplayActive bool `json:"gpu_display_active"`
GPUMemBw float64 `json:"gpu_mem_bw"`
BwNVLink float64 `json:"bw_nvlink"`
DirectPortCount int `json:"direct_port_count"`
GPULanes int `json:"gpu_lanes"`
PCIeBw float64 `json:"pcie_bw"`
PCIGen float64 `json:"pci_gen"`
DLPerf float64 `json:"dlperf"`
CPUName string `json:"cpu_name"`
MoboName string `json:"mobo_name"`
CPURam int `json:"cpu_ram"`
CPUCores float64 `json:"cpu_cores"`
CPUCoresEffective float64 `json:"cpu_cores_effective"`
GPUFrac float64 `json:"gpu_frac"`
HasAVX int `json:"has_avx"`
DiskSpace float64 `json:"disk_space"`
DiskName string `json:"disk_name"`
DiskBw float64 `json:"disk_bw"`
InetUp float64 `json:"inet_up"`
InetDown float64 `json:"inet_down"`
StartDate float64 `json:"start_date"`
EndDate *float64 `json:"end_date"`
Duration *float64 `json:"duration"`
StorageCost float64 `json:"storage_cost"`
InetUpCost float64 `json:"inet_up_cost"`
InetDownCost float64 `json:"inet_down_cost"`
StorageTotalCost float64 `json:"storage_total_cost"`
Verification string `json:"verification"`
Score float64 `json:"score"`
Rented bool `json:"rented"`
BundledResults int `json:"bundled_results"`
PendingCount int `json:"pending_count"`
Search ExtendedOfferDetails `json:"search"`
Instance ExtendedOfferDetails `json:"instance"`
}
type ExtendedOfferDetails struct {
GPUCostPerHour float64 `json:"gpuCostPerHour"`
DiskHour float64 `json:"diskHour"`
TotalHour float64 `json:"totalHour"`
DiscountTotalHour float64 `json:"discountTotalHour"`
DiscountedTotalPerHour float64 `json:"discountPerHour"`
}
func (o *Offer) String() string {