|
1 | | -""" |
2 | | -
|
3 | | -$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ |
4 | | -$ __ __ _ _ _____ $ |
5 | | -$ | \/ | ___ __| | ___| | |_ _| _ _ __ ___ _ __ $ |
6 | | -$ | |\/| |/ _ \ / _` |/ _ \ | | || | | | '_ \ / _ \ '__| $ |
7 | | -$ | | | | (_) | (_| | __/ | | || |_| | | | | __/ | $ |
8 | | -$ |_| |_|\___/ \__,_|\___|_| |_| \__,_|_| |_|\___|_| $ |
9 | | -$ $ |
10 | | -$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ |
11 | | - |
| 1 | +from .main import * |
| 2 | +from .logo import * |
| 3 | + |
| 4 | +import os |
| 5 | +import sys |
| 6 | +import builtins |
| 7 | + |
| 8 | +# Detailed Documentation |
| 9 | + |
| 10 | +detailed_doc = """ |
12 | 11 | The `model_tuner` library is a versatile and powerful tool designed to |
13 | 12 | facilitate the training, evaluation, and tuning of machine learning models. |
14 | 13 | It supports various functionalities such as handling imbalanced data, applying |
15 | 14 | different scaling and imputation techniques, calibrating models, and conducting |
16 | 15 | cross-validation. This library is particularly useful for model selection, |
17 | 16 | hyperparameter tuning, and ensuring optimal performance across different metrics. |
18 | 17 |
|
| 18 | +PyPI: https://pypi.org/project/model-tuner/ |
| 19 | +Documentation: https://uclamii.github.io/model_tuner/ |
| 20 | +
|
| 21 | +
|
19 | 22 | Version: 0.0.25a |
20 | 23 |
|
21 | 24 | """ |
22 | 25 |
|
| 26 | +# Assign only the detailed documentation to __doc__ |
| 27 | +__doc__ = detailed_doc |
| 28 | + |
| 29 | + |
23 | 30 | __version__ = "0.0.25a" |
24 | 31 | __author__ = "Arthur Funnell, Leonid Shpaner, Panayiotis Petousis" |
25 | 32 | |
26 | 33 |
|
27 | | -from .main import * |
| 34 | + |
| 35 | +# Define the custom help function |
| 36 | +def custom_help(obj=None): |
| 37 | + """ |
| 38 | + Custom help function to dynamically include ASCII art in help() output. |
| 39 | + """ |
| 40 | + if ( |
| 41 | + obj is None or obj is sys.modules[__name__] |
| 42 | + ): # When `help()` is called for this module |
| 43 | + print(model_tuner_logo) # Print ASCII art first |
| 44 | + print(detailed_doc) # Print the detailed documentation |
| 45 | + else: |
| 46 | + original_help(obj) # Use the original help for other objects |
| 47 | + |
| 48 | + |
| 49 | +# Backup the original help function |
| 50 | +original_help = builtins.help |
| 51 | + |
| 52 | +# Override the global help function in builtins |
| 53 | +builtins.help = custom_help |
0 commit comments