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

Add openai miner #5

Merged
merged 9 commits into from
Sep 12, 2023
Merged

Add openai miner #5

merged 9 commits into from
Sep 12, 2023

Conversation

ifrit98
Copy link
Contributor

@ifrit98 ifrit98 commented Sep 12, 2023

No description provided.

Copy link
Contributor

@Eugene-hu Eugene-hu left a comment

Choose a reason for hiding this comment

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

LGTM, left you a few suggestions

# Full Usage
```
usage: miner.py [-h] [--openai.suffix OPENAI.SUFFIX] [--openai.max_tokens OPENAI.MAX_TOKENS]
[--openai.temperature OPENAI.TEMPERATURE] [--openai.top_p OPENAI.TOP_P] [--openai.n OPENAI.N]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these args still being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, needed some love. Updated.

self.wandb_run.tags = self.wandb_run.tags + ("openai_miner",)
openai.api_key = api_key

def prompt(self, synapse: Prompting) -> Prompting:
Copy link
Contributor

Choose a reason for hiding this comment

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

The assumption is that all miners will have a prompt function that is automatically attached to the axon right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a template for others to build upon, let's add some more documentation on the args that this function should take and what it should return.

Copy link
Contributor Author

@ifrit98 ifrit98 Sep 12, 2023

Choose a reason for hiding this comment

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

Good call! Added some docstrings.

@ifrit98 ifrit98 merged commit 7369908 into main Sep 12, 2023
@ifrit98 ifrit98 deleted the add_openai_miner branch September 15, 2023 21:25
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.

None yet

2 participants