misikoff commited on
Commit
59b76de
1 Parent(s): 51f8985

try loading script

Browse files
Files changed (1) hide show
  1. zillow.py +31 -30
zillow.py CHANGED
@@ -48,8 +48,8 @@ _LICENSE = ""
48
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
49
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
50
  _URLS = {
51
- "first_domain": "https://huggingface.co/great-new-dataset-first_domain.zip",
52
- "second_domain": "https://huggingface.co/great-new-dataset-second_domain.zip",
53
  }
54
 
55
 
@@ -76,11 +76,11 @@ class NewDataset(datasets.GeneratorBasedBuilder):
76
  version=VERSION,
77
  description="This part of my dataset covers a first domain",
78
  ),
79
- datasets.BuilderConfig(
80
- name="second_domain",
81
- version=VERSION,
82
- description="This part of my dataset covers a second domain",
83
- ),
84
  ]
85
 
86
  DEFAULT_CONFIG_NAME = "first_domain" # It's not mandatory to have a default configuration. Just use one if it make sense.
@@ -92,21 +92,21 @@ class NewDataset(datasets.GeneratorBasedBuilder):
92
  ): # This is the name of the configuration selected in BUILDER_CONFIGS above
93
  features = datasets.Features(
94
  {
95
- "sentence": datasets.Value("string"),
96
- "option1": datasets.Value("string"),
97
- "answer": datasets.Value("string"),
98
- # These are the features of your dataset like images, labels ...
99
- }
100
- )
101
- else: # This is an example to show how to have different features for "first_domain" and "second_domain"
102
- features = datasets.Features(
103
- {
104
- "sentence": datasets.Value("string"),
105
- "option2": datasets.Value("string"),
106
- "second_domain_answer": datasets.Value("string"),
107
  # These are the features of your dataset like images, labels ...
108
  }
109
  )
 
 
 
 
 
 
 
 
 
110
  return datasets.DatasetInfo(
111
  # This is the description that will appear on the datasets page.
112
  description=_DESCRIPTION,
@@ -169,15 +169,16 @@ class NewDataset(datasets.GeneratorBasedBuilder):
169
  if self.config.name == "first_domain":
170
  # Yields examples as (key, example) tuples
171
  yield key, {
172
- "sentence": data["sentence"],
173
- "option1": data["option1"],
174
- "answer": "" if split == "test" else data["answer"],
175
- }
176
- else:
177
- yield key, {
178
- "sentence": data["sentence"],
179
- "option2": data["option2"],
180
- "second_domain_answer": (
181
- "" if split == "test" else data["second_domain_answer"]
182
- ),
183
  }
 
 
 
 
 
 
 
 
 
48
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
49
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
50
  _URLS = {
51
+ "first_domain": "https://files.zillowstatic.com/research/public_csvs/zhvf_growth/Metro_zhvf_growth_uc_sfrcondo_tier_0.33_0.67_sm_sa_month.csv",
52
+ # "second_domain": "https://huggingface.co/great-new-dataset-second_domain.zip",
53
  }
54
 
55
 
 
76
  version=VERSION,
77
  description="This part of my dataset covers a first domain",
78
  ),
79
+ # datasets.BuilderConfig(
80
+ # name="second_domain",
81
+ # version=VERSION,
82
+ # description="This part of my dataset covers a second domain",
83
+ # ),
84
  ]
85
 
86
  DEFAULT_CONFIG_NAME = "first_domain" # It's not mandatory to have a default configuration. Just use one if it make sense.
 
92
  ): # This is the name of the configuration selected in BUILDER_CONFIGS above
93
  features = datasets.Features(
94
  {
95
+ "RegionID": datasets.Value("RegionID"),
96
+ "SizeRank": datasets.Value("SizeRank"),
97
+ "RegionName": datasets.Value("RegionName"),
 
 
 
 
 
 
 
 
 
98
  # These are the features of your dataset like images, labels ...
99
  }
100
  )
101
+ # else: # This is an example to show how to have different features for "first_domain" and "second_domain"
102
+ # features = datasets.Features(
103
+ # {
104
+ # "sentence": datasets.Value("string"),
105
+ # "option2": datasets.Value("string"),
106
+ # "second_domain_answer": datasets.Value("string"),
107
+ # # These are the features of your dataset like images, labels ...
108
+ # }
109
+ # )
110
  return datasets.DatasetInfo(
111
  # This is the description that will appear on the datasets page.
112
  description=_DESCRIPTION,
 
169
  if self.config.name == "first_domain":
170
  # Yields examples as (key, example) tuples
171
  yield key, {
172
+ "RegionID": data["RegionID"],
173
+ "SizeRank": data["SizeRank"],
174
+ "RegionName": data["RegionName"],
175
+ # "answer": "" if split == "test" else data["answer"],
 
 
 
 
 
 
 
176
  }
177
+ # else:
178
+ # yield key, {
179
+ # "sentence": data["sentence"],
180
+ # "option2": data["option2"],
181
+ # "second_domain_answer": (
182
+ # "" if split == "test" else data["second_domain_answer"]
183
+ # ),
184
+ # }