Skip to content

Commit

Permalink
adds tdp-finder to models library & adds test impl
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcook1186 committed Oct 10, 2023
1 parent 022bd92 commit 18e7f31
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
19 changes: 19 additions & 0 deletions examples/impls/tdp-finder-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: tdp-tester
initialize:
models:
- name: tdp-finder # a model that returns an embodied value given the sci embodied attribution equation.
kind: builtin
verbose: false
path: ''
graph:
children:
backend:
pipeline:
- tdp-finder
config:
tdp-finder:
tdp:
observations:
- timestamp: 2023-07-06T00:00
physical-processor: AMD 3020e

1 change: 1 addition & 0 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export * from './shell-imp';
export * from './teads-aws';
export * from './teads-curve';
export * from './watt-time';
export * from './tdp-finder';
5 changes: 4 additions & 1 deletion src/util/models-universe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
SciAccentureModel,
EAvevaModel,
SciEModel,
TdpFinderModel,
} from '../lib';

import {
Expand Down Expand Up @@ -70,6 +71,8 @@ export class ModelsUniverse {
return EMemModel;
case 'aveva':
return EAvevaModel;
case 'tdp-finder':
return TdpFinderModel;
default:
throw new Error(`Missing or wrong model: ${name}.`);
}
Expand Down Expand Up @@ -110,7 +113,7 @@ export class ModelsUniverse {
* Initializes and registers model.
*/
public writeDown(model: ImplInitializeModel) {
const {name, kind, config} = model;
const { name, kind, config } = model;

Check failure on line 116 in src/util/models-universe.ts

View workflow job for this annotation

GitHub Actions / build

Replace `·name,·kind,·config·` with `name,·kind,·config`

const Model = this.handModelByCriteria(name, kind);

Expand Down

0 comments on commit 18e7f31

Please sign in to comment.