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

Segmentation fault -- UserWarning: Pydantic serializer warnings #5

Open
ZoeQU opened this issue Jun 11, 2024 · 3 comments
Open

Segmentation fault -- UserWarning: Pydantic serializer warnings #5

ZoeQU opened this issue Jun 11, 2024 · 3 comments

Comments

@ZoeQU
Copy link

ZoeQU commented Jun 11, 2024

I have a new wrong situation here:
after python train.py and I get this error:

UserWarning: Pydantic serializer warnings:
Expected Union[float, tuple[float, float]] but got list - serialized value may not be as expected

image
could anyone help me? Many many thanks!

@hietalajulius
Copy link
Owner

What in the code is using pydantic? I don't remember using it 🤔

@ZoeQU
Copy link
Author

ZoeQU commented Jun 13, 2024

What in the code is using pydantic? I don't remember using it 🤔

The 'cloth_env.py' needs it, I checked that import albumentations as A that albumentations relays on pdantic. The version of my pydantic is 2.7.0. And the error occurred in train.py line28:
def experiment(variant): eval_env = cloth_env.ClothEnv( **variant['env_kwargs'], randomization_kwargs=variant['randomization_kwargs'])

I print the 'varient' here:
{'algorithm': 'SAC', 'title': 'default-run-0', 'save_folder': '/root/dynamic-cloth-folding/trainings/default-run-0', 'random_seed': 0, 'randomization_kwargs': {'lights_randomization': True, 'materials_randomization': True, 'camera_position_randomization': True, 'lookat_position_randomization': True, 'lookat_position_randomization_radius': 0.03, 'dynamics_randomization': True, 'albumentations_randomization': True, 'cloth_size': 0.2, 'camera_type': 'side', 'camera_config': {'type': 'small', 'fovy_range': (13, 15), 'height': 100, 'width': 848}, 'position_perturbation_size': 0.2, 'rotation_perturbation_size': 0.75, 'fovy_perturbation_size': 0.05}, 'value_function_kwargs': {'fc_layer_size': 512, 'fc_layer_depth': 5}, 'policy_kwargs': {'input_width': 100, 'input_height': 100, 'input_channels': 1, 'kernel_sizes': [3, 3, 3, 3], 'n_channels': [32, 32, 32, 32], 'strides': [2, 2, 2, 2], 'paddings': [0, 0, 0, 0], 'hidden_sizes_aux': [256, 8], 'hidden_sizes_main': [256, 256, 256, 256], 'init_w': 0.0001, 'aux_output_size': 9}, 'env_kwargs': {'save_folder': '/root/dynamic-cloth-folding/trainings/default-run-0', 'timestep': 0.01, 'success_distance': 0.05, 'robot_observation': 'ctrl', 'control_frequency': 10, 'ctrl_filter': 0.03, 'kp': 1000.0, 'frame_stack_size': 1, 'damping_ratio': 1, 'success_reward': 0, 'fail_reward': -1, 'extra_reward': 1, 'output_max': 0.03, 'max_close_steps': 10, 'sparse_dense': True, 'goal_noise_range': (0.0, 0.03), 'image_obs_noise_mean': 0.5, 'image_obs_noise_std': 0.5, 'model_kwargs_path': './data/model_params.csv'}, 'eval_kwargs': {'save_images_every_epoch': 10, 'num_runs': 20, 'max_path_length': 50, 'additional_keys': ['robot_observation'], 'frame_stack_size': 1, 'save_blurred_images': True, 'save_folder': '/root/dynamic-cloth-folding/trainings/default-run-0'}, 'algorithm_kwargs': {'num_epochs': 100, 'num_trains_per_train_loop': 1000, 'num_expl_steps_per_train_loop': 1000, 'num_train_loops_per_epoch': 20, 'max_path_length': 50, 'save_policy_every_epoch': 1, 'batch_size': 256, 'num_demoers': 0, 'save_folder': '/root/dynamic-cloth-folding/trainings/default-run-0'}, 'path_collector_kwargs': {'additional_keys': ['robot_observation'], 'demo_paths': ['./data/demos.csv'], 'demo_divider': 0.03, 'num_processes': 1}, 'replay_buffer_kwargs': {'max_size': 100000, 'fraction_goals_rollout_goals': 0.19999999999999996, 'internal_keys': ['image', 'robot_observation']}, 'trainer_kwargs': {'discount': 0.99, 'soft_target_tau': 0.005, 'target_update_period': 1, 'policy_lr': 0.0003, 'qf_lr': 0.0003, 'reward_scale': 1, 'use_automatic_entropy_tuning': True, 'corner_prediction_loss_coef': 0.001}}

Could you provide some suggestions? Thanks!

@hietalajulius
Copy link
Owner

Looks like those pydantic logs are just warnings, most likely unrelated to the segfault. I would recommend running with e.g. gdb to see what's happening: #3 (comment)

The issue is definitely in some binding/cpp code, not in python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants