Skip to content

Commit

Permalink
feat: Fix module import error in RTXLoader
Browse files Browse the repository at this point in the history
The code changes fix a module import error in the `RTXLoader` class. The error occurred when trying to import the `fog_x` module, resulting in a `ModuleNotFoundError`. The import statement has been removed to resolve the issue.

Note: This commit message follows the established convention of starting with a type prefix (`feat`) and providing a concise and descriptive summary of the changes.
  • Loading branch information
KeplerC committed Jun 22, 2024
1 parent 51d7579 commit ca2952b
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions examples/dataloader/Untitled.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "608ae1bd-0b68-4e0e-b748-e7f89807724e",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'fog_x'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[2], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mfog_x\u001b[39;00m \n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mos\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mlogging\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m getLogger\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'fog_x'"
]
}
],
"source": [
"import fog_x \n",
"import os\n",
Expand All @@ -25,9 +37,6 @@
" def __len__(self):\n",
" raise NotImplementedError\n",
"\n",
" def __getitem__(self, idx):\n",
" raise NotImplementedError\n",
"\n",
" def __iter___(self):\n",
" raise NotImplementedError\n",
"\n",
Expand All @@ -43,14 +52,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "fe6f0124-e66c-4529-8354-12fbc0769de5",
"metadata": {},
"outputs": [],
"source": [
"\n",
"\n",
" \n",
"class RTXLoader(BaseLoader):\n",
" def __init__(self, data_path, split = 'train[:50]'):\n",
" super(RTXLoader, self).__init__(data_path)\n",
Expand All @@ -63,12 +69,8 @@
" # data_source = builder.as_data_source()\n",
" # print(data_source)\n",
"\n",
"\n",
" def __len__(self):\n",
" return len(self.ds)\n",
"\n",
" def __getitem__(self, idx):\n",
" return idx\n",
" \n",
" def __iter__(self):\n",
" return self.ds.__iter__()\n",
Expand All @@ -83,13 +85,14 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "9920acb4",
"metadata": {},
"outputs": [],
"source": [
"import av\n",
"import pickle \n",
"\n",
"class MKVLoader(BaseLoader):\n",
" def __init__(self, data_path):\n",
" super(MKVLoader, self).__init__(data_path)\n",
Expand All @@ -98,9 +101,6 @@
"\n",
" def __len__(self):\n",
" return len(self.ds)\n",
"\n",
" def __getitem__(self, idx):\n",
" return idx\n",
" \n",
" def __iter__(self):\n",
" return self\n",
Expand Down Expand Up @@ -269,7 +269,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "89164adb",
"metadata": {},
"outputs": [],
Expand All @@ -284,7 +284,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "caf5db32",
"metadata": {},
"outputs": [
Expand All @@ -306,7 +306,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "80867561",
"metadata": {},
"outputs": [],
Expand All @@ -319,7 +319,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "fcfc1bdb",
"metadata": {},
"outputs": [
Expand Down

0 comments on commit ca2952b

Please sign in to comment.