@@ -21,6 +21,7 @@ def source_to_source(
21
21
source : str = "torch" ,
22
22
target : str = "tensorflow" ,
23
23
reuse_existing : bool = True ,
24
+ output_dir : str = "ivy_transpiled_outputs/" ,
24
25
):
25
26
"""Converts a given object (class/function) from one framework to another.
26
27
@@ -39,6 +40,8 @@ def source_to_source(
39
40
If False, it will re-translate `object`,
40
41
even if it already exists in the directory, and overwrite
41
42
the old implementation. Defaults to 'True'.
43
+ output_dir (str, optional): The path to the directory where translated files will be saved.
44
+ Defaults to 'ivy_transpiled_outputs/' in the current working directory.
42
45
43
46
Returns:
44
47
The translated object."""
@@ -50,6 +53,7 @@ def source_to_source(
50
53
source = source ,
51
54
target = target ,
52
55
reuse_existing = reuse_existing ,
56
+ output_dir = output_dir ,
53
57
)
54
58
55
59
@@ -174,6 +178,7 @@ def transpile(
174
178
source : str = "torch" ,
175
179
target : str = "tensorflow" ,
176
180
reuse_existing : bool = True ,
181
+ output_dir : str = "ivy_transpiled_outputs/" ,
177
182
):
178
183
"""Converts a given object (class/function) from one framework to another.
179
184
@@ -192,6 +197,8 @@ def transpile(
192
197
If False, it will re-translate `object`,
193
198
even if it already exists in the directory, and overwrite
194
199
the old implementation. Defaults to 'True'.
200
+ output_dir (str, optional): The path to the directory where translated files will be saved.
201
+ Defaults to 'ivy_transpiled_outputs/' in the current working directory.
195
202
196
203
Returns:
197
204
The translated object."""
@@ -203,4 +210,5 @@ def transpile(
203
210
source = source ,
204
211
target = target ,
205
212
reuse_existing = reuse_existing ,
213
+ output_dir = output_dir ,
206
214
)
0 commit comments