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

Release/2.4 #13

Merged
merged 53 commits into from
Nov 19, 2023
Merged

Release/2.4 #13

merged 53 commits into from
Nov 19, 2023

Conversation

surcyf123
Copy link
Collaborator

In the miner:

  • made the forward pass to _prompt and images an async generator as well as the openai call so that one can handle multiple validator requests at once
  • added new image generation method to create high-quality dall-e-3 images to respond to the new ImageResponse synapse
  • increased temperature from 0 -> 0.0001 to avoid greedy decoding and instead use the new seed argument to increase chance of ensure deterministic/reproducible results
  • update openai to use a more stable version with added functionality (fixes 10 minute timeout bug and added an http timeout in the client just in case.
  • switched to the AsyncOpenAI client instead of the OpenAI client

In the validator:

  • wholistic refactor of the codebase for better readability, performance, and structure
  • same openai updates as the miner, using upgraded version, using the Async client
  • change the alpha of the moving average to be so that newer scores have less of an effect on overall scores. This is needed with the new scoring mechanism to not be TOO random for the final set weights per epoch
  • change the requested engine to be gpt-4-turbo (gpt-4-1106-preview) 100% of the time. This - is actually 1/3 cheaper for input tokens and 1/2 cheaper for output tokens as gpt-4. Much faster as well.
  • added synthetic theme and question prompting generation for images
  • improved stability of wandb: all vali runs are logged in consistent format as your uid number with reinit=False to save storage space and improve organization
  • added wandb logging of images as well as its metadata
  • eliminated miner pool logic and now we use unique queries for every prompt
  • added randomness of evaluation for text to save validator costs
  • made IsAlive synapse async and now we await all responses at once (this saves 1 minute per iteration)
  • decreased IsAlive timeout from 1 second to .8 seconds
  • increased steps per set weights to 5 from 3 because of the faster and more efficient cycle

In reward.py

  • added image validation process (steps below)
  • first we check the source of the received url to make sure it came from the desired source
  • then we check if there is an image in the url and ensure we can load it
  • then we verify the size of the image matches the size requested
  • then we calculate the cosine similarity between the image text embeddings and the prompt using CLIP
  • if all steps pass and the cosine similarity is above the threshold, we give a score of 1, otherwise if any fail, we give a score of 0

Other:

  • updated the test_openai.py script with gpt-4-turbo and the updated client for everyone to make ensure api keys and everything is working
  • added a test_images.py script to ensure your images are working as well.
  • added new packages to requirements.txt that are needed with the new validation system
  • added a script to pull your wandb run to see the prompts, responses, and images easily (wandb/pull_wandb)
  • increased version to 1.1.0 and added the version to wandb logging.
  • changed logging levels for better functionality and readability

@surcyf123 surcyf123 merged commit fd3cb7d into main Nov 19, 2023
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.

Constant timeouts after multiple calls with async
1 participant