Skip to content

processๅŽๆ นๆฎๅ›พ็‰‡่ทฏๅพ„ๆ— ๆณ•ๅŠ ่ฝฝย #872

@liumian576

Description

@liumian576

Before Asking ๅœจๆ้—ฎไน‹ๅ‰

  • I have read the README carefully. ๆˆ‘ๅทฒ็ปไป”็ป†้˜…่ฏปไบ† README ไธŠ็š„ๆ“ไฝœๆŒ‡ๅผ•ใ€‚

  • I have pulled the latest code of main branch to run again and the problem still existed. ๆˆ‘ๅทฒ็ปๆ‹‰ๅ–ไบ†ไธปๅˆ†ๆ”ฏไธŠๆœ€ๆ–ฐ็š„ไปฃ็ ๏ผŒ้‡ๆ–ฐ่ฟ่กŒไน‹ๅŽ๏ผŒ้—ฎ้ข˜ไปไธ่ƒฝ่งฃๅ†ณใ€‚

Search before asking ๅ…ˆๆœ็ดข๏ผŒๅ†ๆ้—ฎ

  • I have searched the Data-Juicer issues and found no similar questions. ๆˆ‘ๅทฒ็ปๅœจ issueๅˆ—่กจ ไธญๆœ็ดขไฝ†ๆ˜ฏๆฒกๆœ‰ๅ‘็Žฐ็ฑปไผผ็š„้—ฎ้ข˜ใ€‚

Question

ๆˆ‘ไฝฟ็”จ็š„ๆ˜ฏwsl2ไธ‹็š„docker pull v1..4.4 ไฝฟ็”จ็š„ๆœฌๅœฐๆ•ฐๆฎ้›†
ๅœจ่ฟ›่กŒanalyzerๆ—ถ่ฟ่กŒ็ป“ๆŸๆ—ถๅ‡บ็Žฐ่ฟ™ไธช้—ฎ้ข˜๏ผŒ
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
/usr/local/lib/python3.10/dist-packages/streamlit/runtime/scriptrunner/exec_code.py:
129 in exec_func_with_error_handling

/usr/local/lib/python3.10/dist-packages/streamlit/runtime/scriptrunner/script_runner
.py:669 in code_to_exec

/data-juicer/app.py:697 in

694 
695 
696 if __name__ == "__main__":

โฑ 697 โ”‚ main()
698

/data-juicer/app.py:693 in main

690 
691 
692 def main():

โฑ 693 โ”‚ Visualize.visualize()
694
695
696 if name == "main":

/data-juicer/app.py:687 in visualize

684 โ”‚   โ”‚   Visualize.setup()
685 โ”‚   โ”‚   Visualize.parser()
686 โ”‚   โ”‚   Visualize.analyze_process()

โฑ 687 โ”‚ โ”‚ Visualize.filter()
688 โ”‚ โ”‚ Visualize.diversity()
689 โ”‚ โ”‚ Visualize.auxiliary()
690

/data-juicer/app.py:655 in filter

652 โ”‚   โ”‚   with st.expander("Effect of Filter OPs", expanded=False):
653 โ”‚   โ”‚   โ”‚   dataset = st.session_state.get("dataset", None)
654 โ”‚   โ”‚   โ”‚   if dataset:

โฑ 655 โ”‚ โ”‚ โ”‚ โ”‚ Visualize.filter_dataset(dataset)
656 โ”‚ โ”‚ โ”‚ else:
657 โ”‚ โ”‚ โ”‚ โ”‚ st.warning("Please analyze original data first")
658

/data-juicer/app.py:339 in filter_dataset

336 โ”‚   โ”‚   else:
337 โ”‚   โ”‚   โ”‚   all_conds = np.all([list(cond.values())[0] for cond in conds], axi
338 โ”‚   โ”‚   ds = pd.DataFrame(dataset)

โฑ 339 โ”‚ โ”‚ Visualize.display_dataset(ds, all_conds, show_num, "Retained samples",
340 โ”‚ โ”‚ st.download_button(
341 โ”‚ โ”‚ โ”‚ "Download Retained data as JSONL", data=convert_to_jsonl(ds.loc[al
342 โ”‚ โ”‚ )

/data-juicer/app.py:512 in display_dataset

509 โ”‚   
510 โ”‚   @staticmethod
511 โ”‚   def display_dataset(dataframe, cond, show_num, desp, type, all=True):

โฑ 512 โ”‚ โ”‚ examples = dataframe.loc[cond]
513 โ”‚ โ”‚ if all or len(examples) > 0:
514 โ”‚ โ”‚ โ”‚ st.subheader(
515 โ”‚ โ”‚ โ”‚ โ”‚ f"{desp}: :red[{len(examples)}] of "

/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py:1191 in getitem

1188 โ”‚   โ”‚   โ”‚   
1189 โ”‚   โ”‚   โ”‚   maybe_callable = com.apply_if_callable(key, self.obj)
1190 โ”‚   โ”‚   โ”‚   maybe_callable = self._check_deprecated_callable_usage(key, maybe

โฑ 1191 โ”‚ โ”‚ โ”‚ return self._getitem_axis(maybe_callable, axis=axis)
1192 โ”‚
1193 โ”‚ def _is_scalar_access(self, key: tuple):
1194 โ”‚ โ”‚ raise NotImplementedError()

/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py:1431 in
_getitem_axis

1428 โ”‚   โ”‚   
1429 โ”‚   โ”‚   # fall thru to straight lookup
1430 โ”‚   โ”‚   self._validate_key(key, axis)

โฑ 1431 โ”‚ โ”‚ return self._get_label(key, axis=axis)
1432 โ”‚
1433 โ”‚ def _get_slice_axis(self, slice_obj: slice, axis: AxisInt):
1434 โ”‚ โ”‚ """

/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py:1381 in _get_label

1378 โ”‚   
1379 โ”‚   def _get_label(self, label, axis: AxisInt):
1380 โ”‚   โ”‚   # GH#5567 this will fail if the label is not present in the axis.

โฑ 1381 โ”‚ โ”‚ return self.obj.xs(label, axis=axis)
1382 โ”‚
1383 โ”‚ def _handle_lowerdim_multi_index_axis0(self, tup: tuple):
1384 โ”‚ โ”‚ # we have an axis0 multi-index, handle or raise

/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py:4301 in xs

 4298 โ”‚   โ”‚   โ”‚   โ”‚   else:
 4299 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   new_index = index[loc]
 4300 โ”‚   โ”‚   else:

โฑ 4301 โ”‚ โ”‚ โ”‚ loc = index.get_loc(key)
4302 โ”‚ โ”‚ โ”‚
4303 โ”‚ โ”‚ โ”‚ if isinstance(loc, np.ndarray):
4304 โ”‚ โ”‚ โ”‚ โ”‚ if loc.dtype == np.bool_:

/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/range.py:417 in get_loc

 414 โ”‚   โ”‚   โ”‚   except ValueError as err:
 415 โ”‚   โ”‚   โ”‚   โ”‚   raise KeyError(key) from err
 416 โ”‚   โ”‚   if isinstance(key, Hashable):

โฑ 417 โ”‚ โ”‚ โ”‚ raise KeyError(key)
418 โ”‚ โ”‚ self._check_indexing_error(key)
419 โ”‚ โ”‚ raise KeyError(key)
420
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
KeyError: True

Additional ้ขๅค–ไฟกๆฏ

่ฟ˜ๆœ‰ไธ€็‚นๆˆ‘็š„ๆŒ‚่ฝฝไฟกๆฏไธบ-v D:/data-juicer-main/data-juicer-main:/data-juicer
data็š„้…็ฝฎไธบ{"images": ["tests/ops/data/img1.png"], "text": "<__dj__image> A comfortable bed."}
{"images": ["tests/ops/data/img2.jpg"], "text": "<__dj__image> A bus."}
{"images": ["tests/ops/data/img3.jpg"], "text": "<__dj__image> Black and white photograph of a woman holding an umbrella."}
{"images": ["tests/ops/data/img4.png"], "text": "<__dj__image> A comfortable bed."}
ๆ•ฐๆฎ็ป็ฎ—ๅญๆธ…ๆ™ฐๅŽ{"images":["tests/ops/data/img2.jpg"],"text":"<__dj__image> A bus."}
processไธญไผšๅ‡บ็Žฐ image_shape_filter โ”‚ <class 'FileNotFoundError'> โ”‚ [Errno 2] No such file or directory: '/data-juicer/outputs/demo-analyzer-image_1/tests/ops/data/img2.jpg

่ฟ™ไธชๆˆ‘ๅบ”่ฏฅๅฆ‚ไฝ•่งฃๅ†ณไฝฟ็”จ็ปๅฏน่ทฏๅพ„ๅ—h๏ผŒไฝ†ๆ˜ฏๆŒ‚่ฝฝๅˆฐdocker่ฟ˜ๆ˜ฏไผšๆ‹ผๆŽฅใ€‚ๆˆ–่€…ๅฐ†่ฟ™ไบ›ไฟกๆฏ้ƒฝๆ”พๅœจๅŒไธ€ไธชๆ–‡ไปถๅคนไธŠๅŒ…ๆ‹ฌๆ•ฐๆฎ

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions