-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor NodeSpec to Hardware Spec #11
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anonymous
providers/lambdalabs/node.go
Outdated
} | ||
} | ||
|
||
func getHardwareSpecFromInstanceTypesRespose(instance client.InstanceType, gpuMem, gpuCount int) types.HardwareSpec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be getHardwareSpecFromInstanceTypesResponse
? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not actually since we're pulling it from a InstanceType
type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getHardwareSpecFromInstanceType is probably fine, thanks @cebilon123 for catching the typo 😄
@@ -99,7 +99,7 @@ type NodeTypesListResponse struct { | |||
type ExecCreateParams struct { | |||
Name string `json:"name,omitempty"` | |||
Provider Provider `json:"provider"` | |||
NodeTypeID string `json:"nodeTypeID,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will impact the CLI since it uses the same types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it so I probably bonked the 'select gpu' flag, will go through and test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see : unweave/cli#13
runtime/runtime.go
Outdated
@@ -42,7 +42,7 @@ type Node interface { | |||
// implemented at. For example, it could be implemented at a VM level for a bare-metal | |||
// provider, at a container level, batch job level, etc. In each case, the node must | |||
// serve as a host to run containers that are accessible via SSH. | |||
InitNode(ctx context.Context, sshKey []types.SSHKey, nodeTypeID string, region *string) (node types.Node, err error) | |||
InitNode(ctx context.Context, sshKey []types.SSHKey, hardwareSpec types.HardwareSpec, region *string) (node types.Node, err error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple naming is generally better. hardwareSpec -> spec
api/server/exec.go
Outdated
@@ -236,7 +232,8 @@ func (s *ExecService) Create(ctx context.Context, projectID string, params types | |||
return nil, fmt.Errorf("failed to setup credentials: %w", err) | |||
} | |||
|
|||
node, err := s.assignNode(ctx, params.NodeTypeID, params.Region, keys) | |||
// Where a user assigns a session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove internal comment
api/server/exec.go
Outdated
@@ -265,6 +262,7 @@ func (s *ExecService) Create(ctx context.Context, projectID string, params types | |||
GitURL: params.GitURL, | |||
} | |||
|
|||
// Where we tell Coreweave to assign an Exec/Session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove internal comment
This PR deprecates the old NodeSpec type in favor of Hardware spec