Closed elifbeyzatok00 closed 1 week ago
Hi @elifbeyzatok00 ,
The problem is in the import , genai
is an alias for the google.generativeai
module . it imported like this :
import google.generativeai as genai
You first need to configure the api (Set up authentication)
import os
genai.configure(api_key=os.environ["API_KEY"])
Then you can set up the model tuning:
operation = genai. create_tuned_model(
display_name="increment",
source_model=base_model,
epoch_count=20,
batch_size=4,
learning_rate=0.001,
training_data=training_data,
)
then Initialize the tuned model for generation
types2question_model = genai.GenerativeModel(model_name=result.name)
Take a look at : Gemini API : Fine-tuning tutorial
from genai import create_tuned_model, GenerativeModel
Hi, careful, the package is google.generativeai
try:
from google.generativeai import create_tuned_model, GenerativeModel
Description of the bug:
I want to fine tune "models/gemini-1.5-flash-001-tuning" but i took an ImportError in VSCode.
csv file: Question-Types.csv
Error Stack:
Actual vs expected behavior:
It must generate a Negative Factual Information Question
Any other information you'd like to share?
System Info
genai info: Name: genai Version: 2.1.0 Summary: Generative AI for IPython (enhance your code cells) Home-page: Author: Kyle Kelley Author-email: rgbkrk@gmail.com License: BSD-3-Clause Location: c:\users\tokel\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages Requires: ipython, openai, tabulate, tiktoken Required-by: