Spaces:
Runtime error
Runtime error
Add skops-sklearn specific question
Browse files
app.py
CHANGED
@@ -28,10 +28,46 @@ Tips:
|
|
28 |
- You might also be interested in the <a href="https://huggingface.co/course" target="_blank">Hugging Face course (link)</a>.
|
29 |
"""
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
internships = {
|
32 |
'Accelerate': default_question,
|
33 |
'Diffusion distillation': default_question,
|
34 |
-
'Skops & Scikit-Learn':
|
35 |
"Code Generation": default_question,
|
36 |
"Document AI Democratization": default_question,
|
37 |
"Evaluate": default_question,
|
|
|
28 |
- You might also be interested in the <a href="https://huggingface.co/course" target="_blank">Hugging Face course (link)</a>.
|
29 |
"""
|
30 |
|
31 |
+
skops_question = """
|
32 |
+
1. Create a python environment[1] and install `scikit-learn` version `1.0` in that environment.
|
33 |
+
<br/>
|
34 |
+
2. Using that environment, create a `LogisticRegression` model[2] and fit it on the Iris dataset[3].
|
35 |
+
<br/>
|
36 |
+
3. Save the trained model using `pickle`[4] or `joblib`[5].
|
37 |
+
<br/>
|
38 |
+
4. Create a second environment, and install `scikit-learn` version `1.1` in it.
|
39 |
+
<br/>
|
40 |
+
5. Try loading the model you saved in step 3 in this second environment.
|
41 |
+
|
42 |
+
<br/>
|
43 |
+
<br/>
|
44 |
+
Question:
|
45 |
+
<br/>
|
46 |
+
Is there a warning or error you receive while trying to load the model? If yes, what exactly is it.
|
47 |
+
|
48 |
+
<br/>
|
49 |
+
<br/>
|
50 |
+
References
|
51 |
+
<br/>
|
52 |
+
- [1] You can use any tool you want to create the environment. Two of the options are:
|
53 |
+
<br/>
|
54 |
+
- `venv`: https://docs.python.org/3/library/venv.html
|
55 |
+
<br/>
|
56 |
+
- `mamba`: https://github.com/mamba-org/mamba
|
57 |
+
<br/>
|
58 |
+
- [2] `LogisticRegression` API guide: https://scikit-learn.org/dev/modules/generated/sklearn.linear_model.LogisticRegression.html
|
59 |
+
<br/>
|
60 |
+
- [3] `load_iris` API guide: https://scikit-learn.org/dev/modules/generated/sklearn.datasets.load_iris.html
|
61 |
+
<br/>
|
62 |
+
- [4] `pickle`: https://docs.python.org/3/library/pickle.html
|
63 |
+
<br/>
|
64 |
+
- [5] - `joblib`: https://joblib.readthedocs.io/en/latest/
|
65 |
+
"""
|
66 |
+
|
67 |
internships = {
|
68 |
'Accelerate': default_question,
|
69 |
'Diffusion distillation': default_question,
|
70 |
+
'Skops & Scikit-Learn': skops_question,
|
71 |
"Code Generation": default_question,
|
72 |
"Document AI Democratization": default_question,
|
73 |
"Evaluate": default_question,
|