天池最新“抱大腿” 大赛提交老是遇到这个报错: ==> /root/tianchi_occlum/image/opt/workflow_tianchi_antispam.tianchi_main.1630773450960_project/tianchi_aiflow/tianchi_main/train_job/logs/train_job_stderr.log <== train(train_path, model_dir, save_name) File "/opt/workflow_tianchi_antispam.tianchi_main.1630773450960_project/tianchi_aiflow/workflows/tianchi_main/tf_main.py", line 62, in train callbacks=[checkpoint], File "/opt/python-occlum/lib/python3.7/site-packages/keras/engine/training.py", line 1148, in fit steps_per_execution=self._steps_per_execution) File "/opt/python-occlum/lib/python3.7/site-packages/keras/engine/data_adapter.py", line 1383, in get_data_handler return DataHandler(*args, **kwargs) File "/opt/python-occlum/lib/python3.7/site-packages/keras/engine/data_adapter.py", line 1150, in init model=model) File "/opt/python-occlum/lib/python3.7/site-packages/keras/engine/data_adapter.py", line 230, in init x, y, sample_weights = _process_tensorlike((x, y, sample_weights)) File "/opt/python-occlum/lib/python3.7/site-packages/keras/engine/data_adapter.py", line 1031, in _process_tensorlike inputs = tf.nest.map_structure(_convert_numpy_and_scipy, inputs) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 869, in map_structure structure[0], [func(*x) for x in entries], File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 869, in structure[0], [func(*x) for x in entries], File "/opt/python-occlum/lib/python3.7/site-packages/keras/engine/data_adapter.py", line 1026, in convert_numpy_and_scipy return tf.convert_to_tensor(x, dtype=dtype) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 206, in wrapper return target(*args, **kwargs) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1431, in convert_to_tensor_v2_with_dispatch value, dtype=dtype, dtype_hint=dtype_hint, name=name) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1441, in convert_to_tensor_v2 as_ref=False) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/profiler/trace.py", line 163, in wrapped return func(*args, **kwargs) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1566, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/tensor_conversion_registry.py", line 52, in default_conversion_function return constant_op.constant(value, dtype, name=name) ./run_bash.sh: line 78: 2444 Terminated /opt/python-occlum/bin/python3.7 push_kafka.py --input_filename=/tcdata/predict.csv --server localhost:9092 --input_topic tianchi_input${time} --output_topic tianchi_output${time} > push_kafka.log File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 272, in constant allow_broadcast=True) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 283, in _constant_impl return _constant_eager_impl(ctx, value, dtype, shape, verify_shape) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 308, in _constant_eager_impl t = convert_to_eager_tensor(value, ctx, dtype) File "/opt/python-occlum/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 106, in convert_to_eager_tensor return ops.EagerTensor(value, ctx.device_name, dtype) numpy.core._exceptions.MemoryError: Unable to allocate 257. MiB for an array with shape (900000, 75) and data type float32
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/python-occlum/lib/python3.7/site-packages/ai_flow_plugins/job_plugins/python/python_run_main.py", line 94, in run_project(l_graph_file, l_working_dir) File "/opt/python-occlum/lib/python3.7/site-packages/ai_flow_plugins/job_plugins/python/python_run_main.py", line 89, in run_project raise Exception(str(e)) Exception: Unable to allocate 257. MiB for an array with shape (900000, 75) and data type float32 Error: 256
按照doc 增加swap 空间,输入到swapon 的时候老是报invalid argument , 根本加不了,绝望,怎么解决?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。