get-params
this package allows you to fetch the arguments of a function from a simple search string, matching a function within a module.
usage
import pandas
loss_fn = find_fn(lib=pandas, module="dataframe")
get_required(loss_fn)
Output:
{'src': 'DataFrame.__init__',
'required': [],
'optional': ['data', 'index', 'columns', 'dtype', 'copy']}
installation
you can install the package using pip:
pip install get-params
or locally:
git clone <repo>
cd <repo>
pip install .
the package can be useful when you want to be flexible with arguments passed to e.g. a user interface, where you want to call a specific function.
it was developed to handle the many loss functions inside the sentence_transformers.losses.
Release files for get-params 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| get-params-0.1.1.tar.gz | 2.8 kB | Details |
Release files / get-params-0.1.1.tar.gz
| Download URL | get-params-0.1.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78d601283a696742eaaa9f4b7184e901efb3aecca2a343555f5fb156532fd485
|
|
BLAKE2b-256 checksum How to use checksums |
3b350f4642331e2b124eaea5bcef167b04d5938c01d8f59118770214aa439878
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.7
|