Feature #8870
Feature #7538: art service/module command-line helpers
Feature #8770: Implement parameter set validation - task 3a of issue #7538
Feature #8773: Create new types in FHiCL that automatically register allowed parameters.
Create parameter checking algorithm against FHiCL reference
Description
Using the key map (i.e. the reference) as described in issue #8868, check user's ParameterSet
object against the allowed configuration. For Sequence<T>
objects, the algorithm must first verify that the FHiCL parameter exists in the configuration file. Then, in order to provide comparisons for individual sequence elements, objects of (FHiCL-padded) type T
must be emplaced in the reference sequence.
Related issues
History
#1 Updated by Kyle Knoepfel over 5 years ago
- Blocked by Feature #8868: Develop key map for automatic registration of FHiCL types added
#2 Updated by Kyle Knoepfel over 5 years ago
- % Done changed from 0 to 20
#3 Updated by Kyle Knoepfel over 5 years ago
- % Done changed from 20 to 30
#4 Updated by Kyle Knoepfel over 5 years ago
- % Done changed from 30 to 50
There are various difficulties with this step. The most pressing corresponds to the following use case.
A user specifies the following in his source code:
struct Config {
struct Input {
Atom<int> a { Key("a") };
};
Sequence< Table<Input> > seqOfTables { Key("tables") };
};
The key map generated for this configuration is (omitting the top-level key associated with Config
):
tables tables[0] tables[0].a
A user, however, may specify the following configuration in a FHiCL file:
tables : [ { a: 1 }, { a: 2 }, { A: 3 } ]
In order for the validation algorithm to detect the misspelled 'A' in the third 'tables' element, the key map must be reset to be:
tables tables[0] tables[0].a tables[1] tables[1].a tables[2] tables[2].a
The algorithm must therefore reassign the keys for parameters of type Sequence<T>
to match the length of the user-provided sequence, once it has been verified that the key "tables"
exists in the user configuration. I have made progress to this end, but some details remain that need ironing out.
#5 Updated by Kyle Knoepfel over 5 years ago
- % Done changed from 50 to 80
The correct key map is now produced upon sequence-size reassignment. This involved improving the RAII design of the parameters, having them unregister themselves in the class destructor. All that remains is to improve some of the error printout.
#6 Updated by Kyle Knoepfel over 5 years ago
- % Done changed from 80 to 100
Error printout now improved and implementation complete.
#7 Updated by Kyle Knoepfel over 5 years ago
- Status changed from Assigned to Resolved
Pushed to repository with commit fhicl-cpp:36dcfbccdb0d127855fc25838fef209dd042103f.
#8 Updated by Kyle Knoepfel over 5 years ago
- Target version changed from 1.18.00 to 1.16.00
#9 Updated by Christopher Green over 5 years ago
- Status changed from Resolved to Closed