Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The error check of max_capacity of array was removed #2041

Open
1 task done
NicoYuan1986 opened this issue Apr 16, 2024 · 1 comment
Open
1 task done

[Bug]: The error check of max_capacity of array was removed #2041

NicoYuan1986 opened this issue Apr 16, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@NicoYuan1986
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When the value of "max_capacity" is one of [[], 'a', (), -1, 4097], an error will be reported like the maximum capacity specified for a Array should be in (0, 4096].

But now the error message has been removed.

[2024-04-16 14:49:46 - DEBUG - ci_test]: (api_request)  : [FieldSchema] args: ['int_array', <DataType.ARRAY: 22>, ''], kwargs: {'element_type': <DataType.INT64: 5>, 'max_capacity': (), 'is_primary': False} (api_request.py:62)
[2024-04-16 14:49:46 - ERROR - ci_test]: Traceback (most recent call last):
  File "/Users/zilliz/nico/milvus/tests/python_client/utils/api_request.py", line 32, in inner_wrapper
    res = func(*args, **_kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zilliz/nico/milvus/tests/python_client/utils/api_request.py", line 63, in api_request
    return func(*arg, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/zilliz/virtual-environment/milvus/lib/python3.11/site-packages/pymilvus/orm/schema.py", line 328, in __init__
    self._parse_type_params()
  File "/Users/zilliz/virtual-environment/milvus/lib/python3.11/site-packages/pymilvus/orm/schema.py", line 358, in _parse_type_params
    self._type_params[k] = int(self._kwargs[k])
                           ^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'tuple'
 (api_request.py:45)
[2024-04-16 14:49:46 - ERROR - ci_test]: (api_response) : int() argument must be a string, a bytes-like object or a real number, not 'tuple' (api_request.py:46)

The error message should be improved.

Expected Behavior

The error message should be improved.

Steps/Code To Reproduce behavior

test_collection.py::TestCollectionARRAY::test_collection_array_field_invalid_capacity

Environment details

- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0):
- Milvus configuration (Settings you made in `server_config.yaml`):

Anything else?

No response

@NicoYuan1986 NicoYuan1986 added the kind/bug Something isn't working label Apr 16, 2024
@NicoYuan1986
Copy link
Author

NicoYuan1986 commented Apr 16, 2024

The same situation of max_length:
test_collection.py::TestCollectionARRAY::test_collection_string_array_max_length_invalid
test_collection.py::TestCollectionARRAY::test_collection_array_field_no_capacity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant