Skip to content
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

Multinode Cleanup #1360

Merged
merged 7 commits into from
Feb 6, 2025
Merged

Multinode Cleanup #1360

merged 7 commits into from
Feb 6, 2025

Conversation

rcano-baseten
Copy link
Contributor

@rcano-baseten rcano-baseten commented Feb 3, 2025

🚀 What

  • omits node count by default (for truss init) - we do this to try to limit the complexity of truss init. Users shouldn't have to worry about the parameter
  • adds some validation, fixes some dict marshalling

💻 How

🔬 Testing

@rcano-baseten rcano-baseten changed the title Nodecount Cleanup Multinode Cleanup Feb 3, 2025
truss/base/validation.py Show resolved Hide resolved
node_count = d.get("node_count")
if node_count is not None:
validate_node_count(node_count)
r.node_count = node_count
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have to do this logic in from_dict right? I think we can just do:

        node_count = d.get("node_count")
        if node_count is not None:
            validate_node_count(node_count)
        return Resources(cpu=cpu, memory=memory, use_gpu=use_gpu, accelerator=accelerator, node_count=node_count)

If node_count is None, it'll be None anyway

@rcano-baseten rcano-baseten merged commit 27dced4 into main Feb 6, 2025
5 checks passed
@rcano-baseten rcano-baseten deleted the rc-2025.02.03-nodecount_cleanup branch February 6, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants