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

[Feature] Generic embedding #12

Merged
merged 3 commits into from
Jun 28, 2024
Merged

[Feature] Generic embedding #12

merged 3 commits into from
Jun 28, 2024

Conversation

dominikandreasseitz
Copy link
Contributor

No description provided.

@Doomsk
Copy link
Member

Doomsk commented Jun 27, 2024

looks good to me

@Doomsk
Copy link
Member

Doomsk commented Jun 27, 2024

@dominikandreasseitz I would avoid overusing try-Exception since it's very slow and costly (it keeps track of all the states to throw an appropriate error message). Using instead

op = getattr(a, b, None)
if op is None:
    op = ...

is more suitable

not in instruction_mapping {instruction_mapping} due to {e}."
)

def evaluate(params: dict = dict(), inputs: dict = dict()) -> ArrayLike:
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the story about params and inputs?
Could a single dictionary or a keyword list like def evaluate(**params_and_inputs) -> ArratLike create an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i agree, essentially for torch it doesnt matter. its just a the legacy-way of how we handled trainable and non-trainable params before

@dominikandreasseitz dominikandreasseitz merged commit 99cdb67 into main Jun 28, 2024
6 checks passed
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.

3 participants