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

Name your decision forest models #35

Closed
alex-ashford-ovo opened this issue Jul 9, 2021 · 5 comments
Closed

Name your decision forest models #35

alex-ashford-ovo opened this issue Jul 9, 2021 · 5 comments

Comments

@alex-ashford-ovo
Copy link

I would like to be able to explicitly name my model. I've seen that the models have a name attribute but it does not appear to be possible to set this manually.

I've tried:

setattr(model, 'name', 'my_cool_model')

And:

tfdf.keras.RandomForestModel(name = 'my_cool_model')
@achoum
Copy link
Collaborator

achoum commented Jul 12, 2021

The error indicates that the attribute name is already used. You can use another name e.g. model.model_name = 'my_cool_model' will work.

Alternatively, you can store this model in a new class e.g. ModelAndMetaData. This way, there is no risk to override an existing attribute and possibly perturbe the internal logic of the model.

@alex-ashford-ovo
Copy link
Author

Is this not a functionality gap as you can do this with the standard keras API?

@achoum
Copy link
Collaborator

achoum commented Jul 19, 2021

You are right. I did not realize this was part of the Keras API :).

The change has been submitted, and it will be part of the next TF-DF release (v0.1.8).

@alex-ashford-ovo
Copy link
Author

Thank you :)

@achoum
Copy link
Collaborator

achoum commented Jul 29, 2021

The change was published in TF-DF 0.1.8.

@achoum achoum closed this as completed Jul 29, 2021
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

2 participants