surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.03k stars 73 forks source link

Cannot import SurMlFile either with Python or Direct Import #278

Closed ReginaPulsifi closed 1 month ago

ReginaPulsifi commented 1 month ago

1) Try to import SurMlFIle using Python but FAILED. Please take note that the url is really starting with wss.


dict_lst = {"work_interest_model": "wi_bestmodel_pca768_3layers_6mins.onnx",
            "work_value_model": "wv_bestmodel_pca768_3layers_4mins.onnx",
            "work_style_model": "ws_bestmodel_pca768_2layers_10mins.onnx"}

for name, file in dict_lst.items():
    SurMlFile.upload(
        path=f"../Model/{name}.surml",
        url="wss://pulsifi-knowledge-graph.fly.dev/ml/import",
        chunk_size=36864,
        namespace="fs_dev",
        database="fs_dev",
        username="root",
        password="root"
    )

Error which I got: thread '' panicked at src/python_apis/storage.rs:282:51: called Result::unwrap() on an Err value: hyper::Error(Connect, "invalid URL, scheme is not http") PanicException: called Result::unwrap() on an Err value: hyper::Error(Connect, "invalid URL, scheme is not http")

2) Try to upload SurMlFIle through the app but also FAILED. I select the surrealmlfile which I want to import into the surrealdb and clicked open. After that nothing show up in the Models folder.

image image image image

My Environment Platform: Desktop OS: Darwin Architecture: aarch64 WebView: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version: 2.0.6 Flags: featureFlags: false, models_view: true, apidocs_view: true, themes: false, newsfeed: true

macjuul commented 1 month ago

This doesn't appear to be specifically Surrealist related to I'll close this issue and recommend creating an issue on the SurrealML or surrealdb repositories instead.

That said, the uploading of surrealML models is currently only supported over HTTP(S) connections, so the URL passed to SurMlFile.upload must have the http or https protocol. Hopefully that solves it! 🙂

macjuul commented 1 month ago

Ah sorry I forgot you also tried using Surrealist which also failed. In case this issue also persists when using the HTTP protocol, could you open the developer console and see if it contains any errors?

ReginaPulsifi commented 1 month ago

Hello, thanks for the reply~ Now the issue is solved using the HTTP protocol