yocto-gl
yocto-gl copied to clipboard
Applymap depreciated, use map
Issues Policy acknowledgement
- [X] I have read and agree to submit bug reports in accordance with the issues policy
Where did you encounter this bug?
Local machine
Willingness to contribute
Yes. I can contribute a fix for this bug independently.
MLflow version
- Client: 2.9.2
System information
- MacOS
- 3.10.10
Describe the problem
Just a warning regarding applymap depreciation. I changed the two cases the warning metions to map and the warning goes away.
Tracking information
REPLACE_ME
Code to reproduce issue
import mlflow
results = mlflow.evaluate(
gpt_model,
eval_df,
model_type="question-answering",
predictions="response",
evaluator_config={
"col_mapping": {
"system_prompt": "system_prompt",
"inputs": "questions",
"context": "source_documents",
}
},
)```
### Stack trace
<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->
FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. string_columns = trimmed_df.columns[(df.applymap(type) == str).all(0)] DataFrame.applymap has been deprecated. Use DataFrame.map instead. data = data.applymap(_hash_array_like_element_as_bytes)
### Other info / logs
<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->
REPLACE_ME
### What component(s) does this bug affect?
- [ ] `area/artifacts`: Artifact stores and artifact logging
- [ ] `area/build`: Build and test infrastructure for MLflow
- [ ] `area/deployments`: MLflow Deployments client APIs, server, and third-party Deployments integrations
- [ ] `area/docs`: MLflow documentation pages
- [ ] `area/examples`: Example code
- [ ] `area/model-registry`: Model Registry service, APIs, and the fluent client calls for Model Registry
- [ ] `area/models`: MLmodel format, model serialization/deserialization, flavors
- [ ] `area/recipes`: Recipes, Recipe APIs, Recipe configs, Recipe Templates
- [ ] `area/projects`: MLproject format, project running backends
- [ ] `area/scoring`: MLflow Model server, model deployment tools, Spark UDFs
- [ ] `area/server-infra`: MLflow Tracking server backend
- [ ] `area/tracking`: Tracking Service, tracking client APIs, autologging
### What interface(s) does this bug affect?
- [ ] `area/uiux`: Front-end, user experience, plotting, JavaScript, JavaScript dev server
- [ ] `area/docker`: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
- [ ] `area/sqlalchemy`: Use of SQLAlchemy in the Tracking Service or Model Registry
- [ ] `area/windows`: Windows support
### What language(s) does this bug affect?
- [ ] `language/r`: R APIs and clients
- [ ] `language/java`: Java APIs and clients
- [ ] `language/new`: Proposals for new client languages
### What integration(s) does this bug affect?
- [ ] `integrations/azure`: Azure and Azure ML integrations
- [ ] `integrations/sagemaker`: SageMaker integrations
- [ ] `integrations/databricks`: Databricks integrations
Hi @cdreetz, thanks for the report! Do you want to raise a PR for the fix you made?
@daniellok-db yeah i'll get that in today
@cdreetz I took a look at the PR, it seems like map was only added in pandas>=2.1
—i think it might be best to hold off on this change until pandas is about to remove applymap
, otherwise we risk breaking a lot of workflows.
@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.
Still occurs this warning now 2024 Feb. How about progress?
Same here
Hi, is there any updates? Still having this issue
hello! still having this warning!
Hello, i'm using 2.11.3 version and still the warning is there.
Having the same error
Try to change this line in digest_utils.py from: df.applymap(str)
to: df.map(str)
it worked for me.