Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
caisar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
caisar
Commits
431bf65f
Commit
431bf65f
authored
1 year ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
[aimos] Rework some style.
parent
59e91079
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/AIMOS.ml
+9
-15
9 additions, 15 deletions
src/AIMOS.ml
src/dataset.ml
+0
-1
0 additions, 1 deletion
src/dataset.ml
with
9 additions
and
16 deletions
src/AIMOS.ml
+
9
−
15
View file @
431bf65f
...
...
@@ -25,19 +25,18 @@ open Base
let
aimos_file
=
Re__Core
.(
compile
(
str
"%{aimos_file}"
))
let
write_config
(
inputs_path
:
string
)
(
models_path
:
string
)
(
perturbation
:
string
)
(
perturbation_path
:
string
)
(
out_mode
:
string
)
(
amplitude
:
Dataset
.
amplitude
)
=
let
write_config
inputs_path
models_path
perturbation
perturbation_path
out_mode
amplitude
=
let
config_file
=
Caml
.
Filename
.
temp_file
"aimos-"
".yml"
in
let
config_path
=
Fpath
.
v
config_file
in
let
ampli
=
Dataset
.
string_of_amplitude
amplitude
in
let
transformations
:
Yaml
.
value
=
let
transformations
=
match
ampli
with
|
None
->
`A
[
`O
[
(
"name"
,
`String
perturbation
)
]
]
|
Some
a
->
`A
[
`O
[
(
"name"
,
`String
perturbation
);
(
"fn_range"
,
`String
a
)
]
]
in
let
options
:
Yaml
.
value
=
let
options
=
match
perturbation_path
with
|
""
->
`O
...
...
@@ -55,7 +54,7 @@ let write_config (inputs_path : string) (models_path : string)
(
"custom_t_path"
,
`String
ctp
);
]
in
let
models
:
Yaml
.
value
=
let
models
=
match
out_mode
with
|
""
->
`A
[
`O
[
(
"defaults"
,
`O
[
(
"models_path"
,
`String
models_path
)
])
]
]
...
...
@@ -73,20 +72,15 @@ let write_config (inputs_path : string) (models_path : string)
];
]
in
let
full_config
:
Yaml
.
value
=
`O
[
(
"options"
,
options
);
(
"models"
,
models
)
]
in
let
full_config
=
`O
[
(
"options"
,
options
);
(
"models"
,
models
)
]
in
Yaml_unix
.
to_file_exn
config_path
full_config
;
config_file
let
build_command
config_prover
(
predicate
:
(
Language
.
nn_shape
,
string
)
Dataset
.
predicate
)
=
let
dataset
=
predicate
.
dataset
in
let
inputs_path
,
models_path
=
(
Unix
.
realpath
dataset
,
Unix
.
realpath
predicate
.
model
.
filename
)
in
let
perturbation
,
(
amplitude
:
Dataset
.
amplitude
)
,
perturbation_path
,
out_mode
=
let
inputs_path
=
Unix
.
realpath
predicate
.
dataset
in
let
models_path
=
Unix
.
realpath
predicate
.
model
.
filename
in
let
perturbation
,
amplitude
,
perturbation_path
,
out_mode
=
match
predicate
.
property
with
|
Dataset
.
MetaRobust
(
_
,
aimos_params
)
->
(
aimos_params
.
perturbation
,
...
...
This diff is collapsed.
Click to expand it.
src/dataset.ml
+
0
−
1
View file @
431bf65f
...
...
@@ -113,7 +113,6 @@ let failwith_unsupported_term t =
let
failwith_unsupported_ls
ls
=
failwith
(
Fmt
.
str
"Unsupported logic symbol %a"
Pretty
.
print_ls
ls
)
(* TODO: use amplitude type instead of 3 ints *)
let
interpret_predicate
env
~
on_model
~
on_dataset
task
=
let
task
=
Trans
.
apply
Introduction
.
introduce_premises
task
in
let
term
=
Task
.
task_goal_fmla
task
in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment