File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,15 @@ def all_file_ids(self):
109109 result = result + diffgram_ids
110110 return result
111111
112+ def explore (self ):
113+ message = '{}/studio/annotate/{}/explorer?dataset_id={}' .format (
114+ self .client .host ,
115+ self .project .project_string_id ,
116+ self .id
117+ )
118+ print ('\033 [92m' + 'To Explore your dataset visit:' + '\033 [0m' )
119+ print ('\033 [96m' + message + '\033 [0m' )
120+
112121 def slice (self , query ):
113122 from diffgram .core .sliced_directory import SlicedDirectory
114123 # Get the first page to validate syntax.
Original file line number Diff line number Diff line change 11from diffgram .core .directory import Directory
22from diffgram .pytorch_diffgram .diffgram_pytorch_dataset import DiffgramPytorchDataset
33from diffgram .tensorflow_diffgram .diffgram_tensorflow_dataset import DiffgramTensorflowDataset
4-
4+ import urllib
55
66class SlicedDirectory (Directory ):
77
@@ -26,6 +26,21 @@ def all_file_ids(self):
2626 result = result + diffgram_files
2727 return result
2828
29+ def explore (self ):
30+
31+
32+ payload = {'dataset_id' : self .original_directory .id , 'query' : self .query }
33+ params = urllib .parse .urlencode (payload , quote_via = urllib .parse .quote )
34+
35+ message = '{}/studio/annotate/{}/explorer?{}' .format (
36+ self .client .host ,
37+ self .project .project_string_id ,
38+ params
39+
40+ )
41+ print ('\033 [92m' + 'To Explore your dataset visit:' + '\033 [0m' )
42+ print ('\033 [96m' + message + '\033 [0m' )
43+
2944 def to_pytorch (self , transform = None ):
3045 """
3146 Transforms the file list inside the dataset into a pytorch dataset.
You can’t perform that action at this time.
0 commit comments