@@ -13,6 +13,7 @@ def import_csv(
1313 name : str | None = None ,
1414 space_id : str | None = None ,
1515 dataset_id : str | None = None ,
16+ private : bool | None = None ,
1617) -> None :
1718 """
1819 Imports a CSV file into a Trackio project. The CSV file must contain a `"step"`
@@ -50,6 +51,10 @@ def import_csv(
5051 SQLite database, unless a `space_id` is provided, in which case a Dataset
5152 will be automatically created with the same name as the Space but with the
5253 `"_dataset"` suffix.
54+ private (`bool` or `None`, *optional*, defaults to `None`):
55+ Whether to make the Space private. If None (default), the repo will be
56+ public unless the organization's default is private. This value is ignored
57+ if the repo already exists.
5358 """
5459 if SQLiteStorage .get_runs (project ):
5560 raise ValueError (
@@ -134,7 +139,9 @@ def import_csv(
134139 if space_id is None :
135140 utils .print_dashboard_instructions (project )
136141 else :
137- deploy .create_space_if_not_exists (space_id = space_id , dataset_id = dataset_id )
142+ deploy .create_space_if_not_exists (
143+ space_id = space_id , dataset_id = dataset_id , private = private
144+ )
138145 deploy .wait_until_space_exists (space_id = space_id )
139146 deploy .upload_db_to_space (project = project , space_id = space_id )
140147 print (
@@ -148,6 +155,7 @@ def import_tf_events(
148155 name : str | None = None ,
149156 space_id : str | None = None ,
150157 dataset_id : str | None = None ,
158+ private : bool | None = None ,
151159) -> None :
152160 """
153161 Imports TensorFlow Events files from a directory into a Trackio project. Each
@@ -180,6 +188,10 @@ def import_tf_events(
180188 SQLite database, unless a `space_id` is provided, in which case a Dataset
181189 will be automatically created with the same name as the Space but with the
182190 `"_dataset"` suffix.
191+ private (`bool` or `None`, *optional*, defaults to `None`):
192+ Whether to make the Space private. If None (default), the repo will be
193+ public unless the organization's default is private. This value is ignored
194+ if the repo already exists.
183195 """
184196 try :
185197 from tbparse import SummaryReader
@@ -280,7 +292,9 @@ def import_tf_events(
280292 if space_id is None :
281293 utils .print_dashboard_instructions (project )
282294 else :
283- deploy .create_space_if_not_exists (space_id , dataset_id = dataset_id )
295+ deploy .create_space_if_not_exists (
296+ space_id , dataset_id = dataset_id , private = private
297+ )
284298 deploy .wait_until_space_exists (space_id )
285299 deploy .upload_db_to_space (project , space_id )
286300 print (
0 commit comments