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

Can't use the verbose=2 argument #93

Closed
Draichi opened this issue May 17, 2024 · 2 comments
Closed

Can't use the verbose=2 argument #93

Draichi opened this issue May 17, 2024 · 2 comments

Comments

@Draichi
Copy link

Draichi commented May 17, 2024

Hello,

Following the documentation, it shows that we can use the verbose argument when training:

Training logs can be shown during training with the verbose=2 argument, or after training with model.describe(). This is useful for debugging and understanding the training process.

But when I follow the example I get this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[4], [line 1](vscode-notebook-cell:?execution_count=4&line=1)
----> [1](vscode-notebook-cell:?execution_count=4&line=1) model = ydf.GradientBoostedTreesLearner(label="income").train(train_ds, verbose=2)

TypeError: train() got an unexpected keyword argument 'verbose'

Am I doing something wrong or is there a problem in the documentation?

@rlcauvin
Copy link

From this documentation, it seems you set verbose globally:

save_verbose = ydf.verbose(0)  # Hide all logs
learner = ydf.RandomForestLearner(label="label")
model = learner.train(pd.DataFrame({"feature": [0, 1], "label": [0, 1]}))
ydf.verbose(save_verbose)  # Restore verbose level

@achoum
Copy link
Collaborator

achoum commented May 30, 2024

The verbose train arguments has been introduced in 2b3e21c

It will be available in the next YDF release.

@achoum achoum closed this as completed May 30, 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

No branches or pull requests

3 participants