Instructions to use jonl521/modeling_simple with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jonl521/modeling_simple with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jonl521/modeling_simple", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download .venv/lib/python3.14/site-packages/setuptools/tests/test_bdist_egg.py from jonl521/modeling_simple: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/setuptools/tests/test_bdist_egg.py
- Command line
-
hf download hf://jonl521/modeling_simple/.venv/lib/python3.14/site-packages/setuptools/tests/test_bdist_egg.py
-
curl -L -o test_bdist_egg.py https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/setuptools/tests/test_bdist_egg.py
1.96 kB
| """develop tests""" | |
| import os | |
| import re | |
| import zipfile | |
| import pytest | |
| from setuptools.dist import Distribution | |
| from . import contexts | |
| SETUP_PY = """\ | |
| from setuptools import setup | |
| setup(py_modules=['hi']) | |
| """ | |
| def setup_context(tmpdir): | |
| with (tmpdir / 'setup.py').open('w') as f: | |
| f.write(SETUP_PY) | |
| with (tmpdir / 'hi.py').open('w') as f: | |
| f.write('1\n') | |
| with tmpdir.as_cwd(): | |
| yield tmpdir | |
| class Test: | |
| def test_bdist_egg(self): | |
| dist = Distribution( | |
| dict( | |
| script_name='setup.py', | |
| script_args=['bdist_egg'], | |
| name='foo', | |
| py_modules=['hi'], | |
| ) | |
| ) | |
| os.makedirs(os.path.join('build', 'src')) | |
| with contexts.quiet(): | |
| dist.parse_command_line() | |
| dist.run_commands() | |
| # let's see if we got our egg link at the right place | |
| [content] = os.listdir('dist') | |
| assert re.match(r'foo-0.0.0-py[23].\d+.egg$', content) | |
| def test_exclude_source_files(self): | |
| dist = Distribution( | |
| dict( | |
| script_name='setup.py', | |
| script_args=['bdist_egg', '--exclude-source-files'], | |
| py_modules=['hi'], | |
| ) | |
| ) | |
| with contexts.quiet(): | |
| dist.parse_command_line() | |
| dist.run_commands() | |
| [dist_name] = os.listdir('dist') | |
| dist_filename = os.path.join('dist', dist_name) | |
| zip = zipfile.ZipFile(dist_filename) | |
| names = list(zi.filename for zi in zip.filelist) | |
| assert 'hi.pyc' in names | |
| assert 'hi.py' not in names | |