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

Suggested heads support #188

Merged
merged 7 commits into from
Feb 23, 2024
Merged

Suggested heads support #188

merged 7 commits into from
Feb 23, 2024

Conversation

approxit
Copy link
Contributor

What I've done:

  • Introduced a new demand manager for combining other demand managers (I'm open to better names)
  • Made that in case of head node request, suggested nodes will be added to demands and scored better
  • Network stats will use suggested nodes too, as it can impact the number of providers
  • Removed explicit fields from ManagerStack in favor of just a collection to start/stop children in order, proving that Manager Stack is a blind alley
  • Small yaml cleanup, adding explicit head node pointer for the sake of network stats logic

Notable remarks:

  • This PR should be checked with golem-core changes: golemfactory/golem-core-python@main...approxit/suggested-heads
  • Suggested heads right now are only available on the mainnet.
  • As the ManagerStack is still considered as a draft, it proved that it can only solve the start/stop problem, and can't solve the problem of how to access its children / partial definitions. stack._managers[-1] is a way with no exit. Another SDK API concept with stages should solve this issue.

@shadeofblue
Copy link
Contributor

please create a complementary pull request for golem-core-python, thank you :)

@approxit approxit force-pushed the approxit/suggested-heads branch from 11d58f9 to 9c0da45 Compare February 22, 2024 18:31
@approxit
Copy link
Contributor Author

After additional consideration, we decided that suggested heads will be implemented a little more genetic, with priority_head_subnet_tag parameter in yaml. This will be used only in case of head node deployment, so this param can be shared in all available_node_types. Additional demand and scoring will be used in setup, only for the head node and when priority_head_subnet_tag is truthy.

By default ray-on-golem-heads subnet is used both for the mainnet and testnet. As providers are available only on the mainnet, it is acceptable for us to have the same configuration for the testnet anyways.
For dev purposes sdk subnet is used for priority_head_subnet_tag.

In addition, I've fixed how stacks are cached, as we need to distinguish now the head node demand from worker demand. Both could have the same configs, but context matters from now on.

Copy link
Contributor

@shadeofblue shadeofblue left a comment

Choose a reason for hiding this comment

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

lgtm

@approxit approxit merged commit 7759c73 into develop Feb 23, 2024
2 checks passed
@approxit approxit deleted the approxit/suggested-heads branch February 23, 2024 17:18
@approxit approxit mentioned this pull request Apr 19, 2024
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