Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

feat: connect reward function #61

Merged
merged 2 commits into from
Apr 14, 2024
Merged

feat: connect reward function #61

merged 2 commits into from
Apr 14, 2024

Conversation

GuiBibeau
Copy link
Collaborator

@GuiBibeau GuiBibeau commented Apr 14, 2024

This connects a basic version of the reward system in the subnet and pushes it to the metagraph to reward the miner. Big changes will be done to this function when the API layer communicates back to the validators the usage statistics. This will also be done in background services to keep the API fast

Description of the pull request

Changes made

  • move to fastapi to keep closer to bittensor stack
  • clean up a bit
  • connect reward functions
  • move outside of JS packages to avoid issues

Related issues

closes #41

Testings done

Screenshots (if any)

Checklist

  • I have written tests
  • My code does not produce new errors
  • I gave myself a code review before asking others.

Copy link

vercel bot commented Apr 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
akeru-akeru-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2024 9:25pm

Comment on lines +47 to +49
@app.get("/")
def index():
return "ok"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

adds healthcheck capacities

Comment on lines +63 to +65
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=os.getenv('PORT', 9000))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

contains wsgi HTTP layer that flask does not and also is what bittensor uses. worth the switch

@GuiBibeau GuiBibeau merged commit 02dae67 into main Apr 14, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validator updates subnet with rewards
1 participant