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

[WIP]: Enabling min max list #2100

Open
wants to merge 36 commits into
base: devel
Choose a base branch
from

Conversation

Jimmy-INL
Copy link
Collaborator


Pull Request Description

What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
What are the significant changes in functionality due to this change request?

For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
  • 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
  • 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
  • 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in XML block, the node <internalParallel> to True.
  • 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 7. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.
  • 8. If an analytic test is changed/added is the the analytic documentation updated/added?
  • 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

@moosebuild
Copy link

Job Precheck on ccde4d9 : invalidated by @Jimmy-INL

1 similar comment
@moosebuild
Copy link

Job Precheck on ccde4d9 : invalidated by @Jimmy-INL

@moosebuild
Copy link

Job Precheck on c3688e2 : invalidated by @Jimmy-INL

@Jimmy-INL Jimmy-INL requested a review from wangcj05 April 6, 2023 16:19
Copy link
Collaborator

@wangcj05 wangcj05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some general comments.

plugins/TEAL Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this update

Comment on lines +76 to +77
self.constraints = None
self.constraintsV = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provide comments for this variables

Comment on lines +84 to +89
self.multiBestPoint = None
self.multiBestFitness = None
self.multiBestObjective = None
self.multiBestConstraint = None
self.multiBestRank = None
self.multiBestCD = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to add comments for all self variables in the init method.


self._collectOptPoint(rlz, offSpringFitness, objectiveVal,g)
self._resolveNewGeneration(traj, rlz, objectiveVal, offSpringFitness, g, info)
if not self._canHandleMultiObjective or len(self._objectiveVar) == 1: # This is a single-objective Optimization case
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think self._canHandleMultiObjective is alway True for GA, so I think you do not need to included it in the check

for y in (self._constraintFunctions + self._impConstraintFunctions):
params += y.parameterNames()
for p in list(set(params) -set([self._objectiveVar[0]]) -set(list(self.toBeSampled.keys()))):
# for p in list(set(params) -set([self._objectiveVar]) -set(list(self.toBeSampled.keys()))):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

sortedConst,sortedRank,sortedCD,sortedAge,sortedPopulation,sortedObjectives,sortedConstV = \
zip(*[(x,y,z,i,j,k,a) for x,y,z,i,j,k,a in \
sorted(zip(newConstMerged,newPopRank.data,newPopCD.data,newAge,newPopulationMerged.tolist(),newObjectivesMerged_pair,newConstVMerged),reverse=False,key=lambda x: (x[0], x[1], -x[2]))])
sortedConstT,sortedRankT,sortedCDT,sortedAgeT,sortedPopulationT,sortedObjectivesT,sortedConstVT = \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to separate the assignments here

Comment on lines +83 to +88
## tentative code block start
# import matplotlib.pyplot as plt
# from mpl_toolkits.mplot3d import Axes3D
# xdata = [item[0] for item in data]
# ydata = [item[1] for item in data]
# zdata = [item[2] for item in data]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Comment on lines +106 to +111
# ax3d = plt.figure().gca(projection='3d')
# ax3d.scatter(xdata, ydata, zdata)
# for x, y, z, label in zip(xdata, ydata, zdata, nonDominatedRank):
# ax3d.text(x, y, z, label)
# plt.title("Data")
# plt.show()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Comment on lines +122 to +127
# # tentative code block start
# import matplotlib.pyplot as plt
# from mpl_toolkits.mplot3d import Axes3D
# xdata = [item[0] for item in objectives]
# ydata = [item[1] for item in objectives]
# zdata = [item[2] for item in objectives]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Comment on lines +143 to +148
# ax3d = plt.figure().gca(projection='3d')
# ax3d.scatter(xdata, ydata, zdata)
# for x, y, z, label in zip(xdata, ydata, zdata, [i+j for i, j in zip([str(ele) for ele in rank.data.tolist()], [str(ele) for ele in crowdDist.tolist()])]):
# ax3d.text(x, y, z, label)
# plt.title("Data")
# plt.show()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

@wangcj05 wangcj05 changed the title Enabling min max list [WIP]: Enabling min max list Jun 7, 2023
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

Successfully merging this pull request may close these issues.

4 participants