Currently I am a student learning Machine Learning, and so my observation is from an academic context. It may be different in a business environment.
One thing I find very odd when I see Python code for machine learning is that when you call a typical network class, you send it lots of parameters, which strikes me as a risky thing to do. Surely it would be better practice to put all of your hyperparameters and configuration values in a special class for hyperparameters and configuration, and then when you want to change the values they are easy to find?
If the class is in a seperate file, you can simply copy it across for the next project.
Would anyone want to comment on why this is not the obvious thing to do?
Here is an example of what I mean:
agent = agent_(gamma=args.gamma, epsilon=args.eps, lr=args.lr, input_dims=env.observation_space.shape, n_actions=env.action_space.n, mem_size=args.max_mem, eps_min=args.eps_min, batch_size=args.bs, replace=args.replace, eps_dec=args.eps_dec, chkpt_dir=args.path, algo=args.algo, env_name=args.env)
Apologies I imagined you might have seen code like this before. As you can see, a lot of hyperparameters and configuration values. I see this a lot in books and courses. Instead of passing all these parameters around, just put them in a class.