haaksmash / pyutils Goto Github PK
View Code? Open in Web Editor NEWUseful, oft-repeated things for Python
License: GNU Lesser General Public License v3.0
Useful, oft-repeated things for Python
License: GNU Lesser General Public License v3.0
I was trying to use utlis, following the example from llama-recipes/examples/quickstart.ipynb file. However, I keep getting a utils error when I run this Python code:
from pathlib import Path
import os
import sys
from utils.dataset_utils import get_preprocessed_dataset
from configs.datasets import samsum_dataset
train_dataset = get_preprocessed_dataset(tokenizer, samsum_dataset, 'train')
First it was saying there is No modle named 'utlis' so I did pip install utils
. Now it says the below error:
ModuleNotFoundError Traceback (most recent call last)
Cell In[3], line 4
2 import os
3 import sys
----> 4 from utils.dataset_utils import get_preprocessed_dataset
5 from configs.datasets import samsum_dataset
7 train_dataset = get_preprocessed_dataset(tokenizer, samsum_dataset, 'train')
ModuleNotFoundError: No module named 'utils.dataset_utils'
When I do:
!pip show utils
This is the output about my utlis version:
Name: utils
Version: 1.0.1
Summary: A grab-bag of utility functions and objects
Home-page: http://github.com/haaksmash/pyutils
Author: Haak Saxberg
Author-email: [email protected]
License: UNKNOWN
Location: /root/Desktop/llama2_70B/llama/env_Py310/lib/python3.10/site-packages
Requires:
Required-by:
PyPi version 1.0.0 of the "utils" includes also "tests" package which creates naming conflicts in many places. I suggest changing setup.py as described here (using "exclude"): https://setuptools.readthedocs.io/en/latest/setuptools.html#using-find-packages should help.
lines like
from limited_dict import LimitedDict
Should be changed to
from .limited_dict import LimitedDict
I don't know if you care to support python >=2.5, so I wanted to ask you to make the change. But I'm happy to make a pull request. The PEP on this is here:
https://www.python.org/dev/peps/pep-0328/
(which is referenced here: https://docs.python.org/3/reference/simple_stmts.html#the-import-statement)
we should have one.
A couple of files are spawning these errors under python 3.7:
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
How can I get utils wheel file for python 3.6 -32 bit window system. Thank you.
I see that issue #23 is closed; however, the tests
folder is back!
This was found via the exact same bug being present in https://github.com/cloudflare/python-cloudflare package (now fixed). See cloudflare/python-cloudflare#178 (comment)
I think the find_packages()
call in setup.py
is hiccuping.
When executing setup.py on utils 0.6 it it breaks with the following stack trace:
Running setup.py (path:/tmp/pip_build/utils/setup.py) egg_info for package utils
Running command python setup.py egg_info
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build/utils/setup.py", line 10, in <module>
long_description=open("README.txt").read(),
IOError: [Errno 2] No such file or directory: 'README.txt'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build/utils/setup.py", line 10, in <module>
long_description=open("README.txt").read(),
IOError: [Errno 2] No such file or directory: 'README.txt'
Changing README.txt
to README.rst
in setup.py should fix this issue.
probably LGPLv3
Is the feature_engineering function no longer a part of this package?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.