Comments (6)
I tried to print data from to_json, found that the time value is right before to_json, so the datetime value is changed during to_json.
@staticmethod
def to_jsonl(dataset, export_path, num_proc=1, **kwargs):
"""
Export method for json/jsonl target files.
:param dataset: the dataset to export.
:param export_path: the path to store the exported dataset.
:param num_proc: the number of processes used to export the dataset.
:param kwargs: extra arguments.
:return:
"""
print(dataset['time'])
dataset.to_json(export_path, force_ascii=False, num_proc=num_proc)
from data-juicer.
I tried to print data from to_json, found that the time value is right before to_json, so the datetime value is changed during to_json.
@staticmethod def to_jsonl(dataset, export_path, num_proc=1, **kwargs): """ Export method for json/jsonl target files. :param dataset: the dataset to export. :param export_path: the path to store the exported dataset. :param num_proc: the number of processes used to export the dataset. :param kwargs: extra arguments. :return: """ print(dataset['time']) dataset.to_json(export_path, force_ascii=False, num_proc=num_proc)
The image bellow is the content after exporting dataset with iso
in my local machine, and we can find the values of text remain unchaned , but with a ios
format. Please check your local time and the Python dependencies, such as datasets
, pandas
, and pyarrow
.
from data-juicer.
I install these package with command pip install -v -e .[all]
, so I think it is the default version, could you help me check your version, here is mine:
pandas 2.0.0
datasets 2.11.0
pyarrow 14.0.1
from data-juicer.
'2023-10-13 16:06:31'
This maybe a bug of pyarrow from v13.0.
I have tested from v11.0 to v14.0 with date_format iso
, here is my results:
- v11.0.0 and v12.0.0 write the right text
2023-10-13T16:06:31.000
to the jsonl file. - v13.0.0 and v14.0.0 write the wrong text
1970-01-01T00:00:01.697
to the jsonl file.
So , we suggest you to downgrade pyarrw to v12.0.0 .
from data-juicer.
This issue is marked as stale because there has been no activity for 21 days. Remove stale label or add new comments or this issue will be closed in 3 day.
from data-juicer.
Close this stale issue.
from data-juicer.
Related Issues (20)
- DJ-v.0.2 docker image update HOT 1
- DJ-v0.2 API page enhancement
- Video content compliance and privacy protection operators (image, text, audio)
- [Bug]: video split by duration mapper return non-exist video
- support panda's student captioner model in our captioning mapper HOT 3
- [Bug]: Video_split_by_scene_mapper create non-exist video_keys
- [Feature Request] Implement more streamlined interfaces for users seeking minimal functionality (data_juicer.op.functional) HOT 2
- Request a sample code demonstrating the use of image_captioning_from_gpt4v_mapper.py HOT 3
- Can not download the data quality classifier models. HOT 1
- alphanumeric_filter算子清洗疑问 HOT 5
- Absolute path to relative path for multi-source
- [Bug]: process on ray occur "TypeError: 'str' object cannot be interpreted as an integer" HOT 8
- filter是否支持batch处理,以及怎么设置batch_size? HOT 5
- hash calculate in ray deduplicator HOT 4
- 为什么大部分的refined recipe都是用simhash去重? HOT 3
- [Bug]: 运行tools/analyze_data.py报错,出现 KeyError: 'text' HOT 2
- [Question] Can't find evalutor.yaml on the path of `/workspace/data-juicer/demos` HOT 1
- A Compatibility Issue in Environment Installation of DJ-Sandbox HOT 1
- stopwords_filter 为什么是过滤掉小于某个阈值的样本 HOT 3
- 报”error: Unrecognized arguments: -B -S -I -c“ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-juicer.