36
36
_save_model ,
37
37
_save_model_code ,
38
38
_save_model_weights ,
39
- _save_requirements_file ,
40
39
_submit_data_to_url ,
41
40
_write_and_save_requirements ,
42
41
)
@@ -51,7 +50,6 @@ def upload_to_cloud(
51
50
model = None ,
52
51
source_code_path : str = "" ,
53
52
checkpoint_path : str = "" ,
54
- requirements_file_path : str = "" ,
55
53
requirements : Optional [List [str ]] = None ,
56
54
weights_only : bool = False ,
57
55
api_key : str = "" ,
@@ -77,12 +75,9 @@ def upload_to_cloud(
77
75
will raise an error. (Optional)
78
76
checkpoint_path:
79
77
The path to the checkpoint that needs to be uploaded. (Optional)
80
- requirements_file_path:
81
- The path to the requirements file, will always be uploaded with the name of `requirements.txt`.
82
78
requirements:
83
79
List of requirements as strings, that will be written as `requirements.txt` and
84
- then uploaded. If both `requirements_file_path` and `requirements` are passed,
85
- a warning is raised as `requirements` is given the priority over `requirements_file_path`.
80
+ then uploaded.
86
81
weights_only:
87
82
If set to `True`, it will only save model weights and nothing else. This raises
88
83
an error if `weights_only` is `True` but no `model` is passed.
@@ -146,28 +141,13 @@ def upload_to_cloud(
146
141
stored = stored ,
147
142
)
148
143
149
- if requirements and requirements_file_path :
150
- # TODO: Later on, figure out how to merge requirements from both args
151
- logging .warning (
152
- "You provided a requirements file (..., requirements_file_path=...)"
153
- " and requirements list (..., requirements=...). In case of any collisions,"
154
- " anything that comes from requirements=... will be given the priority."
155
- )
156
-
157
144
if requirements :
158
145
stored = _write_and_save_requirements (
159
146
model_name ,
160
147
requirements = requirements ,
161
148
stored = stored ,
162
149
tmpdir = tmpdir ,
163
150
)
164
- elif requirements_file_path :
165
- stored = _save_requirements_file (
166
- model_name ,
167
- requirements_file_path = requirements_file_path ,
168
- stored = stored ,
169
- tmpdir = tmpdir ,
170
- )
171
151
172
152
url = _save_meta_data (
173
153
model_name ,
0 commit comments