Skip to content

Commit

Permalink
* fix for unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
HYLcool committed Apr 17, 2024
1 parent 3b048c3 commit 5b94f29
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Data-Juicer(包含[DJ-SORA](docs/DJ_SORA_ZH.md))正在积极更新和维护

欢迎提issues/PRs,以及加入我们的[Slack频道](https://join.slack.com/t/data-juicer/shared_invite/zt-23zxltg9d-Z4d3EJuhZbCLGwtnLWWUDg?spm=a2c22.12281976.0.0.7a8275bc8g7ypp)[钉钉群](https://qr.dingtalk.com/action/joingroup?spm=a2c22.12281976.0.0.7a8275bc8g7ypp&code=v1,k1,C0DI7CwRFrg7gJP5aMC95FUmsNuwuKJboT62BqP5DAk=&_dt_no_comment=1&origin=11) 进行讨论!


----

## 新消息
Expand Down
1 change: 0 additions & 1 deletion data_juicer/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
from .data import NestedDataset
from .executor import Executor
from .exporter import Exporter
from .sandbox.pipelines import SandBoxExecutor
from .tracer import Tracer
2 changes: 1 addition & 1 deletion data_juicer/core/sandbox/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import os.path
from typing import List

import wandb
import yaml
from jsonargparse import Namespace as JsonNamespace
from jsonargparse import namespace_to_dict
from loguru import logger

import wandb
from data_juicer.config import init_configs, merge_config
from data_juicer.core import Analyser
from data_juicer.core import Executor as DjExecutor
Expand Down
5 changes: 1 addition & 4 deletions tests/ops/filter/test_video_tagging_from_frames_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _run_video_tagging_from_frames_filter(self,
res_list = dataset.to_list()
self.assertEqual(res_list, target_list)

def test_default(self):
def test(self):
ds_list = [{
'text': f'{SpecialTokens.video} 白色的小羊站在一旁讲话。旁边还有两只灰色猫咪和一只拉着灰狼的猫咪。',
'videos': [self.vid1_path]
Expand Down Expand Up @@ -74,7 +74,6 @@ def test_uniform(self):
frame_num=10)
self._run_video_tagging_from_frames_filter(op, ds_list, tgt_list)


def test_contain_any(self):
ds_list = [{
'text':
Expand Down Expand Up @@ -133,7 +132,6 @@ def test_contain_all(self):
any_or_all='any')
self._run_video_tagging_from_frames_filter(op, ds_list, tgt_list)


def test_all(self):
ds_list = [{
'text':
Expand All @@ -159,7 +157,6 @@ def test_all(self):
any_or_all='all')
self._run_video_tagging_from_frames_filter(op, ds_list, tgt_list)


def test_multi_process(self):
# WARNING: current parallel tests only work in spawn method
import multiprocess
Expand Down
2 changes: 1 addition & 1 deletion tests/ops/mapper/test_video_tagging_from_frames_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _run_video_tagging_from_frames_mapper(self,
res_list = dataset.to_list()
self.assertEqual(res_list, target_list)

def test_default(self):
def test(self):
ds_list = [{
'text': f'{SpecialTokens.video} 白色的小羊站在一旁讲话。旁边还有两只灰色猫咪和一只拉着灰狼的猫咪。',
'videos': [self.vid1_path]
Expand Down
2 changes: 1 addition & 1 deletion tools/sandbox_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from loguru import logger

from data_juicer.config import dict_to_namespace, init_configs
from data_juicer.core import SandBoxExecutor
from data_juicer.core.sandbox.pipelines import SandBoxExecutor


def prepare_side_configs(config):
Expand Down

0 comments on commit 5b94f29

Please sign in to comment.