zeno-ml / zeno-client

Python client for creating new Zeno projects and uploading data
https://zenoml.com/docs/intro/#creating-a-project
MIT License
8 stars 0 forks source link

fix: prevent project creation if name is empty or contains special ch… #31

Closed Sparkier closed 11 months ago

Sparkier commented 11 months ago

…aracter

towards ZEN-233 fix ZEN-219

linear[bot] commented 11 months ago
ZEN-233 URL encode project, report, and user names

Causes failure w/ special characters such as question marks

linear[bot] commented 11 months ago
ZEN-219 Client should validate inputs to make sure they result in valid URL paths

If you call create_system with the following arguments (note the ".." in the system name), it gives a cryptic "not found" APIError: ``` project.upload_system(df_out, name="../gpt-4", output_column="answer", id_column="example_id") ``` This resulted in user confusion: [https://lti-at-cmu.slack.com/archives/C05QRD1LPJQ/p1696606706259099](https://lti-at-cmu.slack.com/archives/C05QRD1LPJQ/p1696606706259099) In general, I would prefer doing most data validation on the backend side (because there's a possibility that people would make requests without using our client). But in this particular case if the input is invalid it will result in hitting a non-existant URL, so it probably has to be done on the client side.