Skip to content

Commit

Permalink
Feat: 1587 - remove redundant fields
Browse files Browse the repository at this point in the history
  • Loading branch information
rybnovdws committed Feb 5, 2024
1 parent ea8069a commit 91117d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 172 deletions.
90 changes: 5 additions & 85 deletions dws/provider/client/gpu_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,89 +17,9 @@ type GPUConfigResponse struct {
}

type RentedGpuInfoResponse struct {
BundleID int64 `json:"bundle_id"`
BundledResults int64 `json:"bundled_results"`
BwNvlink int64 `json:"bw_nvlink"`
ComputeCap int64 `json:"compute_cap"`
CpuCores int64 `json:"cpu_cores"`
CpuCoresEffective float64 `json:"cpu_cores_effective"`
CpuName string `json:"cpu_name"`
CpuRam int64 `json:"cpu_ram"`
CudaMaxGood float64 `json:"cuda_max_good"`
DirectPortCount int64 `json:"direct_port_count"`
DiskBw float64 `json:"disk_bw"`
DiskName string `json:"disk_name"`
DiskSpace float64 `json:"disk_space"`
Dlperf float64 `json:"dlperf"`
DlperfPerDphtotal float64 `json:"dlperf_per_dphtotal"`
DphBase float64 `json:"dph_base"`
DphTotal float64 `json:"dph_total"`
DriverVersion string `json:"driver_version"`
Duration float64 `json:"duration"`
EndDate float64 `json:"end_date"`
External bool `json:"external"`
FlopsPerDphtotal float64 `json:"flops_per_dphtotal"`
Geolocation string `json:"geolocation,omitempty"`
GpuDisplayActive bool `json:"gpu_display_active"`
GpuFrac float64 `json:"gpu_frac"`
GpuLanes float64 `json:"gpu_lanes"`
GpuMemBw float64 `json:"gpu_mem_bw"`
GpuName string `json:"gpu_name"`
GpuRam int64 `json:"gpu_ram"`
HasAvx int64 `json:"has_avx"`
HostId int64 `json:"host_id"`
HostRunTime int64 `json:"host_run_time"`
HostingType any `json:"hosting_type,omitempty"`
Id int64 `json:"id"`
InetDown float64 `json:"inet_down"`
InetDownBilled float64 `json:"inet_down_billed,omitempty"`
InetDownCost float64 `json:"inet_down_cost"`
InetUp float64 `json:"inet_up"`
InetUpBilled float64 `json:"inet_up_billed,omitempty"`
InetUpCost float64 `json:"inet_up_cost"`
IsBid bool `json:"is_bid"`
MachineId int64 `json:"machine_id"`
MinBid float64 `json:"min_bid"`
MoboName string `json:"mobo_name"`
NumGpus int64 `json:"num_gpus"`
PciGen int64 `json:"pci_gen"`
PcieBw float64 `json:"pcie_bw"`
PendingCount int64 `json:"pending_count"`
PublicIpaddr string `json:"public_ipaddr"`
Reliability2 float64 `json:"reliability2"`
Rentable bool `json:"rentable"`
Rented bool `json:"rented"`
Score float64 `json:"score"`
StartDate float64 `json:"start_date"`
StorageCost float64 `json:"storage_cost"`
StorageTotalCost float64 `json:"storage_total_cost"`
TotalFlops float64 `json:"total_flops"`
Verification string `json:"verification"`
Webpage string `json:"webpage,omitempty"`
ActualStatus string `json:"actual_status,omitempty"`
CurState string `json:"cur_state"`
DirectPortEnd int64 `json:"direct_port_end"`
DirectPortStart int64 `json:"direct_port_start"`
DiskUtil float64 `json:"disk_util"`
ExtraEnv []string `json:"extra_env"`
GpuTemp float64 `json:"gpu_temp,omitempty"`
GpuUtil float64 `json:"gpu_util,omitempty"`
ImageArgs []string `json:"image_args,omitempty"`
ImageRuntype string `json:"image_runtype"`
ImageUuid string `json:"image_uuid"`
IntendedStatus string `json:"intended_status"`
JupyterToken string `json:"jupyter_token"`
Label string `json:"label,omitempty"`
LocalIpaddrs string `json:"local_ipaddrs"`
Logo string `json:"logo"`
MachineDirSshPort int64 `json:"machine_dir_ssh_port"`
MemLimit float64 `json:"mem_limit,omitempty"`
MemUsage float64 `json:"mem_usage,omitempty"`
NextState string `json:"next_state"`
Onstart string `json:"onstart"`
SshHost string `json:"ssh_host"`
SshIdx string `json:"ssh_idx"`
SshPort int64 `json:"ssh_port"`
StatusMsg string `json:"status_msg"`
VmemUsage float64 `json:"vmem_usage,omitempty"`
ActualStatus string `json:"actual_status,omitempty"`
GpuName string `json:"gpu_name"`
NumGpus int64 `json:"num_gpus"`
SshHost string `json:"ssh_host"`
SshPort int64 `json:"ssh_port"`
}
88 changes: 1 addition & 87 deletions dws/resource/gpu/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,93 +39,7 @@ func TestGPUResourceModel_FromClientRentedGPUResponse(t *testing.T) {
UUID: types.String{},
},
args: args{
c: &client.RentedGpuInfoResponse{
BundleID: 0,
BundledResults: 0,
BwNvlink: 0,
ComputeCap: 0,
CpuCores: 0,
CpuCoresEffective: 0,
CpuName: "",
CpuRam: 0,
CudaMaxGood: 0,
DirectPortCount: 0,
DiskBw: 0,
DiskName: "",
DiskSpace: 0,
Dlperf: 0,
DlperfPerDphtotal: 0,
DphBase: 0,
DphTotal: 0,
DriverVersion: "",
Duration: 0,
EndDate: 0,
External: false,
FlopsPerDphtotal: 0,
Geolocation: "",
GpuDisplayActive: false,
GpuFrac: 0,
GpuLanes: 0,
GpuMemBw: 0,
GpuName: "",
GpuRam: 0,
HasAvx: 0,
HostId: 0,
HostRunTime: 0,
HostingType: 0,
Id: 0,
InetDown: 0,
InetDownBilled: 0,
InetDownCost: 0,
InetUp: 0,
InetUpBilled: 0,
InetUpCost: 0,
IsBid: false,
MachineId: 0,
MinBid: 0,
MoboName: "",
NumGpus: 0,
PciGen: 0,
PcieBw: 0,
PendingCount: 0,
PublicIpaddr: "",
Reliability2: 0,
Rentable: false,
Rented: false,
Score: 0,
StartDate: 0,
StorageCost: 0,
StorageTotalCost: 0,
TotalFlops: 0,
Verification: "",
Webpage: "",
ActualStatus: "",
CurState: "",
DirectPortEnd: 0,
DirectPortStart: 0,
DiskUtil: 0,
ExtraEnv: nil,
GpuTemp: 0,
GpuUtil: 0,
ImageArgs: nil,
ImageRuntype: "",
ImageUuid: "",
IntendedStatus: "",
JupyterToken: "",
Label: "",
LocalIpaddrs: "",
Logo: "",
MachineDirSshPort: 0,
MemLimit: 0,
MemUsage: 0,
NextState: "",
Onstart: "",
SshHost: "",
SshIdx: "",
SshPort: 0,
StatusMsg: "",
VmemUsage: 0,
},
c: &client.RentedGpuInfoResponse{},
},
wantErr: false,
},
Expand Down

0 comments on commit 91117d2

Please sign in to comment.