Datasets:

License:
Leyo commited on
Commit
f0d6058
1 Parent(s): a8e2ee7

add logger

Browse files
Files changed (1) hide show
  1. SNLI-VE.py +6 -4
SNLI-VE.py CHANGED
@@ -5,7 +5,9 @@ import json
5
  import os
6
  import datasets
7
 
 
8
 
 
9
  _CITATION = """\
10
  @article{xie2019visual,
11
  title={Visual Entailment: A Novel Task for Fine-grained Image Understanding},
@@ -85,9 +87,9 @@ class SNLIVE(datasets.GeneratorBasedBuilder):
85
  # Then, the dataset can be loaded using the following command `datasets.load_dataset("flickr30k", data_dir="<path/to/folder>")`.
86
  # """
87
  DEFAULT_CONFIG_NAME = "Default"
88
- print("HER0")
89
  def _info(self):
90
- print("HERE1")
91
  return datasets.DatasetInfo(
92
  description=_DESCRIPTION,
93
  features=_FEATURES,
@@ -97,7 +99,7 @@ class SNLIVE(datasets.GeneratorBasedBuilder):
97
  )
98
 
99
  def _split_generators(self, dl_manager):
100
- print("HERE2")
101
  urls = {
102
  "Default": {
103
  "train": os.path.join(_SNLI_VE_URL_BASE, _SNLI_VE_SPLITS["train"]),
@@ -134,7 +136,7 @@ class SNLIVE(datasets.GeneratorBasedBuilder):
134
 
135
  def _generate_examples(self, snli_ve_annotation_path, images_path):
136
  counter = 0
137
- print("HERE3")
138
  print(snli_ve_annotation_path)
139
  with open(snli_ve_annotation_path, 'r') as json_file:
140
  for elem in json_file:
 
5
  import os
6
  import datasets
7
 
8
+ import logging
9
 
10
+ logger = datasets.logging.get_logger(__name__)
11
  _CITATION = """\
12
  @article{xie2019visual,
13
  title={Visual Entailment: A Novel Task for Fine-grained Image Understanding},
 
87
  # Then, the dataset can be loaded using the following command `datasets.load_dataset("flickr30k", data_dir="<path/to/folder>")`.
88
  # """
89
  DEFAULT_CONFIG_NAME = "Default"
90
+ logger.warning("HER0")
91
  def _info(self):
92
+ logger.warning("HERE1")
93
  return datasets.DatasetInfo(
94
  description=_DESCRIPTION,
95
  features=_FEATURES,
 
99
  )
100
 
101
  def _split_generators(self, dl_manager):
102
+ logger.warning("HERE2")
103
  urls = {
104
  "Default": {
105
  "train": os.path.join(_SNLI_VE_URL_BASE, _SNLI_VE_SPLITS["train"]),
 
136
 
137
  def _generate_examples(self, snli_ve_annotation_path, images_path):
138
  counter = 0
139
+ logger.warning("HERE3")
140
  print(snli_ve_annotation_path)
141
  with open(snli_ve_annotation_path, 'r') as json_file:
142
  for elem in json_file: