You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Make sure to resolve any conflicts and keep the changes you want to keep.
202
+
203
+
## Troubleshooting
204
+
205
+
### Containerized Evaluation Function Fails to Start
206
+
207
+
If your evaluation function is working fine when run locally, but not when containerized, there is much more to consider. Here are some common issues and solution approaches:
208
+
209
+
**Run-time dependencies**
210
+
211
+
Make sure that all run-time dependencies are installed in the Docker image.
212
+
213
+
- Python packages: Make sure to add the dependency to the `pyproject.toml` file, and run `poetry install` in the Dockerfile.
214
+
- System packages: If you need to install system packages, add the installation command to the Dockerfile.
215
+
- ML models: If your evaluation function depends on ML models, make sure to include them in the Docker image.
216
+
- Data files: If your evaluation function depends on data files, make sure to include them in the Docker image.
217
+
218
+
**Architecture**
219
+
220
+
Some package may not be compatible with the architecture of the Docker image. Make sure to use the correct platform when building and running the Docker image.
221
+
222
+
E.g. to build a Docker image for the `linux/x86_64` platform, use the following command:
223
+
224
+
```bash
225
+
docker build --platform=linux/x86_64 .
226
+
```
227
+
228
+
**Verify Standalone Execution**
229
+
230
+
If requests are timing out, it might be due to the evaluation function not being able to run. Make sure that the evaluation function can be run as a standalone script. This will help you to identify issues that are specific to the containerized environment.
231
+
232
+
To run just the evaluation function as a standalone script, without using Shimmy, use the following command:
233
+
234
+
```bash
235
+
docker run -it --rm my-python-evaluation-function python -m evaluation_function.main
236
+
```
237
+
238
+
If the command starts without any errors, the evaluation function is working correctly. If not, you will see the error message in the console.
0 commit comments