Skip to content

remove keras_templates imports from models __init__#82

Draft
sbuergers wants to merge 6 commits intomainfrom
remove_keras_from_init
Draft

remove keras_templates imports from models __init__#82
sbuergers wants to merge 6 commits intomainfrom
remove_keras_from_init

Conversation

@sbuergers
Copy link
Contributor

@sbuergers sbuergers commented Dec 22, 2023

#83

in models and metrics we imported keras functions from keras_templates in the __init__.py, so even if users of SAM want to not use keras they need to have this rather big dependency installed if they want to use, say, a Lasso model.

This PR needs some more work and most of all testing so that the parts of SAM that should not depend on KERAS or TENSORFLOW have all tests passing without it being installed.

@sbuergers sbuergers added the Type: Improvement Any technical improvement without changing functionality label Dec 22, 2023
@sbuergers sbuergers self-assigned this Dec 22, 2023
return False

if type(df.index) == pd.core.indexes.datetimes.DatetimeIndex and (
if type(df.index) is pd.core.indexes.datetimes.DatetimeIndex and (
Copy link
Collaborator

Choose a reason for hiding this comment

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

isinstance(df.index, pd.core.indexes.datetimes.DatetimeIndex)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ruben preferred the type() is syntax. I don't mind either way. I think the situations in which they differ almost never occur, and should not in this case, right?

@sbuergers sbuergers marked this pull request as draft December 22, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Improvement Any technical improvement without changing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants