DsL
commited on
Commit
·
c781e59
1
Parent(s):
71b7d36
update
Browse files- Causal3D.py +6 -11
Causal3D.py
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
-
import glob
|
| 3 |
from pathlib import Path
|
| 4 |
-
from typing import List
|
| 5 |
-
import pandas as pd
|
| 6 |
-
import numpy as np
|
| 7 |
from tqdm import tqdm
|
| 8 |
-
import datasets
|
| 9 |
|
| 10 |
print("✅ Custom Causal3D loaded: outside Causal3D.py")
|
| 11 |
_CITATION = """\
|
|
@@ -26,12 +23,13 @@ _HOMEPAGE = "https://huggingface.co/datasets/LLDDSS/Causal3D"
|
|
| 26 |
_LICENSE = "CC-BY-4.0"
|
| 27 |
|
| 28 |
class Causal3D(datasets.GeneratorBasedBuilder):
|
|
|
|
|
|
|
|
|
|
| 29 |
DEFAULT_CONFIG_NAME = "real_scenes_Real_magnet_v3"
|
| 30 |
BUILDER_CONFIGS = [
|
| 31 |
# hypothetical_scenes
|
| 32 |
-
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v2_linear",
|
| 33 |
-
version=datasets.Version("1.0.0"),
|
| 34 |
-
description="Hypothetic_v2_linear scene"),
|
| 35 |
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v2_nonlinear", version=datasets.Version("1.0.0"), description="Hypothetic_v2_nonlinear scene"),
|
| 36 |
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v3_fully_connected_linear", version=datasets.Version("1.0.0"), description="Hypothetic_v3_fully_connected_linear scene"),
|
| 37 |
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v4_linear_full_connected", version=datasets.Version("1.0.0"), description="Hypothetic_v4_linear_full_connected scene"),
|
|
@@ -59,7 +57,6 @@ class Causal3D(datasets.GeneratorBasedBuilder):
|
|
| 59 |
]
|
| 60 |
|
| 61 |
def _info(self):
|
| 62 |
-
print(">>> Loaded config:", self.config.name) # 🟡 加这个调试输出
|
| 63 |
return datasets.DatasetInfo(
|
| 64 |
description=_DESCRIPTION,
|
| 65 |
features=datasets.Features({
|
|
@@ -170,6 +167,4 @@ class Causal3D(datasets.GeneratorBasedBuilder):
|
|
| 170 |
|
| 171 |
except Exception as e:
|
| 172 |
print(color(f"Error processing CSV rows: {e}", "31"))
|
| 173 |
-
|
| 174 |
-
|
| 175 |
|
|
|
|
| 1 |
+
import datasets
|
| 2 |
+
import pandas as pd
|
| 3 |
import os
|
|
|
|
| 4 |
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
| 5 |
from tqdm import tqdm
|
|
|
|
| 6 |
|
| 7 |
print("✅ Custom Causal3D loaded: outside Causal3D.py")
|
| 8 |
_CITATION = """\
|
|
|
|
| 23 |
_LICENSE = "CC-BY-4.0"
|
| 24 |
|
| 25 |
class Causal3D(datasets.GeneratorBasedBuilder):
|
| 26 |
+
# def __init__(self):
|
| 27 |
+
# super().__init__()
|
| 28 |
+
# print("Causal3D dataset builder initialized.")
|
| 29 |
DEFAULT_CONFIG_NAME = "real_scenes_Real_magnet_v3"
|
| 30 |
BUILDER_CONFIGS = [
|
| 31 |
# hypothetical_scenes
|
| 32 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v2_linear", version=datasets.Version("1.0.0"), description="Hypothetic_v2_linear scene"),
|
|
|
|
|
|
|
| 33 |
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v2_nonlinear", version=datasets.Version("1.0.0"), description="Hypothetic_v2_nonlinear scene"),
|
| 34 |
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v3_fully_connected_linear", version=datasets.Version("1.0.0"), description="Hypothetic_v3_fully_connected_linear scene"),
|
| 35 |
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v4_linear_full_connected", version=datasets.Version("1.0.0"), description="Hypothetic_v4_linear_full_connected scene"),
|
|
|
|
| 57 |
]
|
| 58 |
|
| 59 |
def _info(self):
|
|
|
|
| 60 |
return datasets.DatasetInfo(
|
| 61 |
description=_DESCRIPTION,
|
| 62 |
features=datasets.Features({
|
|
|
|
| 167 |
|
| 168 |
except Exception as e:
|
| 169 |
print(color(f"Error processing CSV rows: {e}", "31"))
|
|
|
|
|
|
|
| 170 |
|