We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current interface loading in utils/launch_utils.py loads a model from file if the class is named Model. This lacks flexibility.
Have a register decorator would be best :
# In model files from stimulus import register_model @register_model class ModelTitanic(...): ...
we could then validate the interface using a small validation method :
def validate_model_interface(cls): required_methods = ['forward', 'compute_loss', 'batch'] for method in required_methods: if not hasattr(cls, method): raise ModelInterfaceError(f"Model {cls.__name__} missing {method}")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your change request related to a problem? Please describe.
Current interface loading in utils/launch_utils.py loads a model from file if the class is named Model. This lacks flexibility.
Describe the solution you'd like
Have a register decorator would be best :
we could then validate the interface using a small validation method :
The text was updated successfully, but these errors were encountered: