Predicitions/Inference using the searched model

I tried to utilize this framework to find the best possible model architecture for a multi class classsification problem. As a result the respective files were created. eg. under /tmp/run_example/tuner-1/1/. The type of files include a checkpoint file, graph.pbtxt, replay_config.pbtxt along with .index, .meta and .data-000000-of-00001 files.
Given that the framework does not store the searched model in a .h5 or SavedModel format, I wanted to know how I could utilize the produced files and load the searched model / restore it, such that I can use it to make predicitions / inference ?
I would really appreciate any help / suggestions in the right direction !
Cheers.

The new commit should enable "export_saved_model" by default (flag switch to True); and It is calling export after model evaluation based on the flag. This will export every model in the search.
Note that replay_config.pbtxt is a config that when supplied to our binary/code, it shifts from performing search, to creating a binary for that trains that specific architecture/ensemble specified in the config. This way models in the search are re-trainable in case new data comes along.

I tried to utilize this framework to find the best possible model architecture for a multi class classsification problem. As a result the respective files were created. eg. under /tmp/run_example/tuner-1/1/. The type of files include a checkpoint file, graph.pbtxt, replay_config.pbtxt along with .index, .meta and .data-000000-of-00001 files.
Given that the framework does not store the searched model in a .h5 or SavedModel format, I wanted to know how I could utilize the produced files and load the searched model / restore it, such that I can use it to make predicitions / inference ?
I would really appreciate any help / suggestions in the right direction !
Cheers.

similar issue here
I did some search, it looks like no matter which way, have to know the model structure (or output layer's) based on the output files in the /tmp/run_example/
this is the one might be the closest to this situation, but have to know the output layer's name etc
https://leimao.github.io/blog/Save-Load-Inference-From-TF-Frozen-Graph/

The new push enables us to find the graph architecture.

The new commit should enable "export_saved_model" by default (flag switch to True); and It is calling export after model evaluation based on the flag. This will export every model in the search.
Note that replay_config.pbtxt is a config that when supplied to our binary/code, it shifts from performing search, to creating a binary for that trains that specific architecture/ensemble specified in the config. This way models in the search are re-trainable in case new data comes along.

Does the new commit also export best model/ensemble to do predictions later with new data? This leads to another question about ensemble. As per config and ensemble spec file, ensemble is tried for every 5 models as default and can be configured. However, how to get the ensemble of best of N models that are trained as the final ensemble to use predictions.

The new commit should enable "export_saved_model" by default (flag switch to True); and It is calling export after model evaluation based on the flag. This will export every model in the search.
Note that replay_config.pbtxt is a config that when supplied to our binary/code, it shifts from performing search, to creating a binary for that trains that specific architecture/ensemble specified in the config. This way models in the search are re-trainable in case new data comes along.

Thanks a lot for your response Hanna. Using the replay_config.pbtxt to train that specific architecure on new data sounds interesting, however, I did not completely understand what you meant by supplying the config file to the binary/code. Could you elaborate a bit as to how I can do that ? Do you mean I pass it as the spec to the SingleTrainer/Provider method instead of the deafult DNN?

Further, I tried to load any of the saved models using tf.keras.models.load_model(). What this returns is an AutoTrackable object with no predict signature, summary method. Are there different means to restore these models and use them for predicitons etc ?

The models exported are not keras, therefore, you shouldn't load them as keras saved models.
Yes, the replay_config can be supplied as "spec" instead of the default dnn and it will make the platform retrain that specific model.
Finally, we export every model in the run - not the best performing one. The user is able to pick and choose which model he/she wants. There are multiple reasons for this:

The user knows best which metric is most important for its model - i.e., he/she can decide to take the model with minimal loss, or highest accuracy/auc or etc...
Better metrics doesn't imply automatically better model - some teams want a high performing model with the smallest number of parameters. Exploring many model architectures can provide them with verity of models to choose from.

Exporting every model enables the user to choose which model is best for him/her. Each model can be deployed as is (via the exported model in its directory) and/or retrained with more data with the replay_config supplied as spec.

The prediction pipeline is deadly wanted.

+1

The exported models can be queried with standard saved_model_cli tool.
https://www.tensorflow.org/guide/saved_model#run_command
In the dummy example in the readme file, when checking an exported model:
$ saved_model_cli show --dir /tmp/check_export/phoenix-tuner-114861/1/saved_model/1616093281/ --tag_set=serve --signature_def serving_default
You get the signature:
The given SavedModel SignatureDef contains the following input(s):   inputs['1'] tensor_info:       dtype: DT_FLOAT       shape: (-1)       name: 1:0   inputs['2'] tensor_info:       dtype: DT_FLOAT       shape: (-1)       name: 2:0   inputs['3'] tensor_info:       dtype: DT_FLOAT       shape: (-1)       name: 3:0 The given SavedModel SignatureDef contains the following output(s):   outputs['log_probabilities'] tensor_info:       dtype: DT_FLOAT       shape: (-1, 2)       name: Phoenix/Trainer/LogSoftmax:0   outputs['logits'] tensor_info:       dtype: DT_FLOAT       shape: (-1, 2)       name: Phoenix/search_generator_0/last_dense_80/logits:0   outputs['predictions'] tensor_info:       dtype: DT_INT64       shape: (-1)       name: Phoenix/Trainer/ArgMax:0   outputs['probabilities'] tensor_info:       dtype: DT_FLOAT       shape: (-1, 2)       name: Phoenix/Trainer/Softmax:0 Method name is: tensorflow/serving/predict
Notice that the model expects three input keys: "1", "2" and "3". This is because in the readme.md example, we have 4 columns and column index "0" is the label. The model has 4 outputs: logits, probabilities, log_probabilities and predictions.
Next, you can ask for predictions:
saved_model_cli run --dir /tmp/check_export/phoenix-tuner-114861/1/saved_model/1616093281/ --input_exprs='1=[1.0];2=[0.0];3=[0.0]' --tag_set 'serve' --signature_def 'serving_default'
The above command output is:
Result for output key log_probabilities: [[-0.29187196 -1.3738289 ]] Result for output key logits: [[ 0.7339718  -0.34798515]] Result for output key predictions: [0] Result for output key probabilities: [[0.74686414 0.25313586]]
Hope this helps. I will add some of the above code snippets to the readme.md.

thanks @hanna-maz
Unfortunately I have a strange error when I try to use saved_model_cli show or run command:
OSError: Cannot parse file b'/Users/tomasz.p/Desktop/GOOGLE_SEARCH_RESULTS/r524xlarge-2/RESULTS/11/saved_model.pbtxt': 1:1 : Message type "tensorflow.SavedModel" has no field named "node"..
have you encountered something like that and can point me to the fix?

I'm having hard time, setting a right way to make predictions on new set:
import tensorflow.compat.v1 as tf
#To make tf 2.0 compatible with tf1.0 code, we disable the tf2.0 functionalities
tf.disable_eager_execution()

from tensorflow.python.client import session
from tensorflow.python.framework import importer
from tensorflow.python.framework import ops
from tensorflow.python.summary import summary
from tensorflow.python.tools import saved_model_utils
from tensorflow.core.framework import graph_pb2 as gpb
from google.protobuf import text_format as pbtf

sess = tf.Session()
gdef = gpb.GraphDef()
with open('/Users/tomasz.p/Desktop/GOOGLE_SEARCH_RESULTS/r524xlarge-2/RESULTS/18/graph.pbtxt', 'r') as fh:
    graph_str = fh.read()
pbtf.Parse(graph_str, gdef)
tf.import_graph_def(gdef)

for op in tf.get_default_graph().get_operations():
    print(str(op.name))

#for n in tf.get_default_graph().as_graph_def().node:
#    print(n.name)

tensor_output = sess.graph.get_tensor_by_name('import/Phoenix/search_generator_0/last_dense_248422238325/logits:0')
tensor_input = sess.graph.get_tensor_by_name('import/Phoenix/search_generator_0/Input/input_layer/1_1/ExpandDims/dim:0')

import pickle
sample, test_label = pickle.load(open("/Users/tomasz.p/Desktop/GOOGLE_SEARCH_RESULTS/r524xlarge-2/RESULTS/11/YS_s4_shap.p", "rb"))
print(sample.shape)

predictions = sess.run(tensor_output, {tensor_input:sample})

print(predictions)

Any suggestions would be highly appreciated, thanks!
I guess for Keras users, then one can wrap the whole model in Lambda layer. Anyway, an example for predictions on new set would be a good addition to this repo.

Hi tom,
I followed your instruction, it looks fine for me, but i got an issue:
ValueError: Cannot feed value of shape (10, 367) for Tensor 'import/Phoenix/prior_generator_0/Input/input_layer/1_1/ExpandDims/dim:0', which has shape '()'
I tried to use
reshape = sess.graph.get_tensor_by_name("import/Phoenix/prior_generator_0/Input/input_layer/1_1/Reshape/shape:0")
predictions = sess.run(tensor_output, {reshape:[10, 367], tensor_input:TX_var})
but still got the same issue, any idea?
to define the shape of the input tensor,

Hi @Xiaoping777
That's an interesting comment. So I tried something like that:
import numpy as np
import pandas as pd
import os
#import tensorflow as tf
import tensorflow.compat.v1 as tf
#To make tf 2.0 compatible with tf1.0 code, we disable the tf2.0 functionalities
tf.disable_eager_execution()
from tensorflow.python.client import session
from tensorflow.python.framework import importer
from tensorflow.python.framework import ops
from tensorflow.python.summary import summary
from tensorflow.python.tools import saved_model_utils
from tensorflow.core.framework import graph_pb2 as gpb
from google.protobuf import text_format as pbtf

sess = tf.Session('', tf.Graph())
with sess.graph.as_default():
    # Read meta graph and checkpoint to restore tf session
    saver = tf.train.import_meta_graph("/Users/tomasz.p/Desktop/GOOGLE_SEARCH_RESULTS/r524xlarge-2/RESULTS/11/model.ckpt-7000000.meta")
    saver.restore(sess,tf.train.latest_checkpoint('/Users/tomasz.p/Desktop/GOOGLE_SEARCH_RESULTS/r524xlarge-2/RESULTS/11/'))
    tensor_output = sess.graph.get_tensor_by_name('Phoenix/Trainer/ArgMax:0')
    tensor_input = sess.graph.get_tensor_by_name('filenames:0')
    sample = "/Users/tomasz.p/test.csv"
    sess.run(tf.global_variables_initializer())
    predictions = sess.run(tensor_output, {tensor_input:sample})
    print(predictions)

and it crashed with:
FailedPreconditionError: GetNext() failed because the iterator has not been initialized. Ensure that you have run the initializer operation for this iterator before getting the next element.
	 [[{{node IteratorGetNext}}]]
During handling of the above exception, another exception occurred:
...

It looks like iterator for csv dataset is not initialize but I could not figure out where it is in the graph and how to initialize it.
Please let me know if you have some ideas how to move this froward. Thanks.

Btw @Xiaoping777
I also started this issue: https://github.com/google/model_search/issues/43
My final goal is to wrap the google search output in keras lambda layer to have a very nice option for predictions using keras.
I think that a lot of people would like to see that type of code and be able to directly use their keras pipelines with models from this repo.

Btw @Xiaoping777
I also started this issue: #43
My final goal is to wrap the google search output in keras lambda layer to have a very nice option for predictions using keras.
I think that a lot of people would like to see that type of code and be able to directly use their keras pipelines with models from this repo.

Thanks for your code, I may try to use the individual dimension as input tomorrow, which was demonstrated by @hanna-maz in his reply of command line inference. actually I checked the training model performance from the tensor board, the training performance is pretty good.

Btw @Xiaoping777
I also started this issue: #43
My final goal is to wrap the google search output in keras lambda layer to have a very nice option for predictions using keras.
I think that a lot of people would like to see that type of code and be able to directly use their keras pipelines with models from this repo.

Thanks for your code, I may try to use the individual dimension as input tomorrow, which was demonstrated by @hanna-maz in his reply of command line inference. actually I checked the training model performance from the tensor board, the training performance is pretty good.

I have a problem with that approach, the model search saves only pbtxt and there is no saved_model directory with saved_model.pb (as typically in other saved models) so renaming graph.pbtxt to saved_model.pbtxt and checking it via
saved_model_cli show --dir
doesn't work. Maybe I don't understand something and some additional conversion is needed. Anyway, this approach doesn't work for me and in addition I don't see the right number of inputs. Somehow for my case I see only 21 inputs instead of 2496.

In my case I can see all the inputs, from import/Phoenix/prior_generator_0/Input/input_layer/1_1  ~ import/Phoenix/prior_generator_2/Input/input_layer/367_1 . Have to output the element in graph into a csv file
however, it is not a elegant method

In my case I can see all the inputs, from import/Phoenix/prior_generator_0/Input/input_layer/1_1 ~ import/Phoenix/prior_generator_2/Input/input_layer/367_1 . Have to output the element in graph into a csv file
however, it is not a elegant method

So I see:
import/Phoenix/search_generator_0/Input/input_layer/1_1/ExpandDims/dim
import/Phoenix/search_generator_0/Input/input_layer/1_1/ExpandDims
import/Phoenix/search_generator_0/Input/input_layer/1_1/Shape
import/Phoenix/search_generator_0/Input/input_layer/1_1/strided_slice/stack
import/Phoenix/search_generator_0/Input/input_layer/1_1/strided_slice/stack_1
import/Phoenix/search_generator_0/Input/input_layer/1_1/strided_slice/stack_2
import/Phoenix/search_generator_0/Input/input_layer/1_1/strided_slice
import/Phoenix/search_generator_0/Input/input_layer/1_1/Reshape/shape/1
import/Phoenix/search_generator_0/Input/input_layer/1_1/Reshape/shape
import/Phoenix/search_generator_0/Input/input_layer/1_1/Reshape
for each of the inputs but am not sure how to feed to that.
There are also
input_1
input_2
...
input_21
stops on 21 in my case. So it's extremely confusing.

The models exported are not keras, therefore, you shouldn't load them as keras saved models.
Yes, the replay_config can be supplied as "spec" instead of the default dnn and it will make the platform retrain that specific model.
Finally, we export every model in the run - not the best performing one. The user is able to pick and choose which model he/she wants. There are multiple reasons for this:

The user knows best which metric is most important for its model - i.e., he/she can decide to take the model with minimal loss, or highest accuracy/auc or etc...
Better metrics doesn't imply automatically better model - some teams want a high performing model with the smallest number of parameters. Exploring many model architectures can provide them with verity of models to choose from.

Exporting every model enables the user to choose which model is best for him/her. Each model can be deployed as is (via the exported model in its directory) and/or retrained with more data with the replay_config supplied as spec.

Could you tell how to retrain model with more data with the replay_config supplied as spec? I am puzzled of this problem.

Hi,
I was running into the same problem and found this way to get inference/prediction for the saved model in python for the case of a csv file (tabular data). In this case the csv is a simple n-by-5 table where the last column gives the labels. Model search was performed as done in the provided example/tutorial with the train csv data, the code loads the test data. The names and dtype of the data in the input dict can be obtained from the "saved_model_cli show" call as shown above. Hope this helps. Will start looking into how to do this for image and timeseries data.
import numpy as np
import tensorflow as tf

loaded = tf.saved_model.load(r'C:/tmp/run_lin_xor_varname_train/tuner-1/18/saved_model/1632837857')
m = loaded.signatures['serving_default']

data = np.genfromtxt("./csv_lin_xor_varname_test.csv", delimiter=',', skip_header=1, dtype=np.float32)
input = {'0':tf.constant(data[:,0]), '1':tf.constant(data[:,1]), '2':tf.constant(data[:,2]), '3':tf.constant(data[:,3])}

output = m(**(input))
predictions = output['predictions'].numpy()

label = data[:,-1]
acc = np.sum(label==predictions,axis=0)/label.shape[0]
print(acc)

@maartenjv Did you find a way to run inference/prediction for the saved model in python for the case of an image file?


Use shorter opcodes for instructions

I've changed the instructions to use 32bit registers as they're enough. Also save the return value in a register so we don't need a .bss section

Sorry for the delay - merged.


Add tests

Add first few tests.
Will add further tests until merge

@rowanG077 If you have any suggestions for tests, feel free to comment and I will add them.

Yeah I have a couple of the top of my head, probaby forgetting some at least:
Function pointers to function pointers.
Functions with trailing returns.
Functions with default arguments
Template classes/Functions.
Operators.
Functions with params that have attribute specifier sequences
int foo([[maybe_unused]] int bar) const;

Function with attribute specifiers
[[nodiscard]] void foo();

Function c-style variadic arguments
int foo(...);

Functions with C++ style variadic arguments.
template<typename T, typename...Args>
T adder(T first, Args... args);

There are a couple more but this aren't implemented properly yet:
Some operators like those mentioned in https://github.com/christophschlosser/doxdocgen/issues/28
And some I came across this week while writing a complex template:
Unnamed params
int foo(int, int);

Templates of templates:
template<typename T, std::size_t m, std::size_t n>
template<std::size_t p>
Matrix<T, m, p> Matrix<T, m, n>::operator*(const Matrix<T, n, p>& mat) const;

BTW I can assist this weekend so we could split up the work, I write test for a couple of them and you also do a couple.

I won‘t get to a pc until tomorrow evening. So I‘m not sure how much I Van help this weekend. This is also the reason why I pushed this yesterday.
Adding new test cases should be fairly simple now. Just add a new case to src/test/extension.test.ts
Adding the new features/fixing them will probably be a bit more challenging😉

@rowanG077 I was thinking mostly alongside of features we already have. So we don't break them while adding new features, sort of regression tests.
Feel free to create issues for the features the extension is still missing


Confused about how credential should be persisted and repopulated.

Description:
I have the OAuth mechanism working end to end, however I'm confused about how the credentials should be persisted. I'm using NSKeyedArchiver to covert the credentials to data which I'm then storing in the keychain in response to the application being terminated. On re-launch I'm checking if the keychain contains any credentials, if so I'm using NSKeyedUnarchiver to reconstruct the credential object but at this point I'm unable to set the credentials back on the SwiftOAuth Client object as the property is get only?
I want to ensure future calls to startAuthorizedRequest use my persisted credentials rather than asking the user to log in again each time the application is killed, what's the correct way to handle this?
OAuth Provider? (Twitter, Github, ..):
OAuth Version:

[x] Version 1
[ ] Version 2

OS (Please fill the version) :

[x] iOS :
[ ] OSX :
[ ] TVOS :
[ ] WatchOS  :

Installation method:

[ ] Carthage
[x] CocoaPods
[ ] Swift Package Manager
[ ] Manually

Library version:

[ ] head
[x] v2.1.0
[ ] v2.0.0
[ ] v1.4.1
[ ] other: (Please fill in the version you are using.)

Xcode version:

[ ] 11.4 (Swift 5.2)

[ ] 11.x (Swift 5.1)

[ ] 10.x (Swift 5.0)

[x] other: (Please fill in the version you are using.) - 12.1

[ ] objective c

https://github.com/OAuthSwift/OAuthSwift/wiki/Store-credential


Incorrect GamerID or Wrong Credentials

Hello, Im new to a lot of this so I do hope my question isnt that bad. When I attempt to run MusicBot from the folder I get the following error. Now Ive followed the guides and as far as I can tell I did everything correctly. Maybe I overlooked something or messed up on a step? Im not sure. Help would be much appreciated as my friends have told me how great this MusicBot is for Discord Servers. Thank you guys and have a great day

Ensure it is your ID and not the bot's you are entering.
Should be about 18 numbers long
Come join us at http://discord.gg/bots   so we can help you with a quicker responce.

7 days old, no new comments. Closing issue based on assumption that help was provided to user in Discord.


82 Donate page

Trello Ticket - Donate

Pre-flight check-list
Before raising a pull request

[ ] Documentation
[ ] Unit tests

Pre-merge check-list

[x] Link to Trello ticket/GitHub issue (If applicable)
[ ] Any risky areas identified
[ ] Test plan provided
[ ] Tester approved

Tester check-list

[ ] Tested on multiple devices / OS versions (Test on the physical device(s) you have access to, otherwise use BrowserStack):

[ ] Galaxy S8 (Android 7.0/8.0)
[ ] Galaxy S7 (Android 6.0)
[ ] iPhone X (iOS 11.x)
[ ] iPhone 8 (11.x)
[ ] iPhone 7 (iOS 10.x)

Optional:

[ ] Google Pixel 2
[ ] Galaxy S8 Plus
[ ] Galaxy S7 Edge
[ ] Galaxy S6
[ ] iPhone 7+
[ ] iPhone 6

Accessibility Testing (If applicable)

[ ] Text-to-Voice (Android: Voice Assistant / iOS: Speak Selection)
[ ] Large Text (=<200%)
[ ] Landscape Screen orientation

Weak connection testing (If applicable)

[ ] Airplane mode
[ ] 2G/3G Network Settings

Unfortunately accessibility for the text input field in TalkBack is really bad.
A native input field on Android (tested in the default Contacts app):

Announces it's label and value when it receives screen reader focus.
Double tap activates it: shows caret and brings up keyboard.
When activated and the screen reader focus is moved away, it stays activated. Double tap on any other activatable element deactivates the input and activates the new element.

The react native TextInput however:

Announces the accessibilityLabel only when the value is empty and there is no placeholder text. When either a value or placeholder is visible, only this is announced.
Double tap does not activate it, even though this is what the screen reader tells you to do. You need to double tab and hold to activate it. Then it shows the caret and brings up the keyboard. (Bug: https://github.com/facebook/react-native/issues/17624)
When activated and the screen reader focus is moved away, it stays activated. Double tap on any other activatable element only deactivates the input. You need to double tap again to activate the new element.

It would be great if anyone could test this with VoiceOver as I don't have an iPhone.

@cellyn-tan Yeah, I will have another look at this. It was surprisingly hard to get it working on iOS and Android. But there has to be a way :-)

There is also this issue opened that this screen is affected by: https://github.com/redbadger/pride-london-app/issues/188. Essentially the CTA on the iPhone X is too close to the bottom of the screen. This could still be merged without that fix and we can address all of the places this appears in one PR.

@cellyn-tan The page scrolls down to reveal the Donate button now when the user focuses the input field. Turned out to be very easy.
Only thing missing now is accessibility.

On iOS it seems fine and Android is just bugged. I suggest we merge like this and do another PR to improve accessibility.


error.details doesn't always exist

I'm having an issue when attempting to use the 'error' api
let schema = Joi.string().error(new Error('Was REALLY expecting a string'));
schema.validate(3);

When doing so, the decodeMessages.js throws the following error:
Uncaught TypeError: Cannot read property 'map' of undefined

It does this because error.details is something that joi adds internally when it creates the Error objects. But you may not always have it.

Looks like other code is dependent on the details.message and details.path. Looks like I have to be sure to specify both of those for it to work.

You can probably fix this by updating the collectErrors function to understand this new error object.
https://github.com/jurassix/joi-validation-strategy/blob/master/src/utils/collectErrors.js#L5
Throw in a failing test, turn it green, and I'll review it and merge it in. 👯

Yeah I guess it might get more complicated, like you called out. We may need to also update the decodeMessages function to understand these new objects as well?
https://github.com/jurassix/joi-validation-strategy/blob/master/src/utils/decodeMessages.js#L5
If you are up for prototyping we can move this to a PR. Or if you can at least open a PR with a failing test added I'll try to extend to support your use case. Thx!

I'm thinking we may need some changes upstream in order for this to fully work. I added a test that has a joi schema with 2 properties that should fail. One with a custom error and one with out.
it('should allow custom error messages', (done) => {
  const schema = {
    a: Joi.string().required(),
    b: Joi.string().required().error(new Error('Custom error'))
  };
  strategy().validate({}, schema, {}, errors => {
    console.log(JSON.stringify(errors));
    expect(errors).to.have.keys(['a', 'b']);
    done();
  })
});

When I log the errors object (after fixing decodeMessages to not blow up on missing details) we don't get anything in there. I think we really just need the upstream library to add the details array to custom errors. Basically by calling the error method in the joi schema, its setting that as the error for the entire schema.

From the Joi docs here: https://github.com/hapijs/joi/blob/v9.0.4/API.md#anyerrorerr

Note that the provided error will be returned as-is, unmodified and undecorated with any of the normal joi error properties. If validation fails and another error is found before the error override, that error will be returned and the override will be ignored (unless the abortEarly option has been set to false).

Can you do something like this as a way around? (pulled from here: https://github.com/hapijs/joi/blob/master/lib/errors.js#L154)
It seems that the error object you are creating needs to be satisfy our internal assumptions.
  const customJoiError = (message, path) =>
     const error = new Error(message);
     error.details = [];
     error.path = path;
     return error;
   }
  const schema = {
    a: Joi.string().required(),
    b: Joi.string().required().error(customJoiError('Custom error', 'b'))
  };

yeah I guess the path field truly belongs on an Object in the details array.
I guess the next question is what is your desired result? A custom message?

Custom messages can be defined as follows: https://jurassix.gitbooks.io/docs-react-validation-mixin/content/overview/custom.html
Although, I do like the conciseness the .error() api provides.

Yea...that should work ... thanks for your help

Awesome! Glad to help.


Fully implemented sorting behavior for tools

Issue #44
What Was Done:
Refined sorting behavior for the tools catalog:

The clicked tool is now consistently moved to the top (index 0).
All other tools shift one position to the right (n + 1).
The top three tools are consistently marked with "Recently Used" badges.
Fixed inconsistencies where some tools weren't properly reordered after multiple clicks.
Re-implemented logic to apply sorting changes to all tools, not just the recently used ones.

The tools are not displayed on the page when the local storage is empty.


Csrf protection rails backbone

@etagwerker @mauro-oto please check this out, I hope I generated everything correctly.

@schmierkov the article looks good, and the generated site looks correct! Check the comments I left and re-generate the site afterwards. :+1:

@mauro-oto thanks for your feedback! :+1:

@schmierkov awesome :beers:
Thanks!


Edit Workspace - Save button does not have correct padding - @parasharrajat

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Navigate to a workspace
Click on the workspace avatar

Expected Result:
Save button should have correct padding. For example

Actual Result:
Button does not have the correct padding.

Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number: 1.1.7-3
Reproducible in staging?: Yes
Reproducible in production?: No
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Please see the screenshots attached in the Expected and Actual results.
Expensify/Expensify Issue URL:
Issue reported by: @parasharrajat
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1633959748110300
View all open jobs on GitHub

I know this can be fixed by padding: 0 but that won't be effective for long.
Proposal
The workspace Edit page is not following the best practice as others. I have worked on various pages for creating and fixing issues with layouts.
Check this video, here button is not always fixed. It scrolls with the content.
https://user-images.githubusercontent.com/24370807/136925510-7adcae76-d454-4900-9ed1-9c8e5ad184f5.mp4
I gave the footer FixedFooter name for a purpose so that it should be fixed at the bottom.But here its failing to do so.
Why it is not fixed?
Because we are adding this inside ScrollView. it is supposed to be placed adjacent to ScrollView. You can check other pages. eg: ProfilePage.
What should we do?

I see that we are utilizing a common Layout WorkspacePageWithSections component to create the workspace pages. Thus we will use slots technique where we set different placeholder for JSX in layout component and then pass the parts as props just like children prop.

so Footer will be passed as
<WorkspacePageWithSections
                headerText={this.props.translate('workspace.common.edit')}
                route={this.props.route}
                footer={(
                    <FixedFooter style={[styles.w100]}>
                        <Button
                            success
                            isLoading={policy.isPolicyUpdating}
                            text={this.props.translate('workspace.editor.save')}
                            onPress={this.submit}
                            pressOnEnter
                        />
                    </FixedFooter>
                )}

then in WorkspacePageWithSections on line 76
            {this.props.children(hasVBA, policyID, isUsingECard)}

                    </View>
                </ScrollView>
            //==>    {this.props.footer}
            </ScreenWrapper>

This fix the padding issue at root and Also page layout issue.
If we want to reduce the padding thing then

We should just add styles.ph0 to FixedFooter. I know this is proposed already but I am proposing as I reported the issue.

This is polish for N6, so I'm removing the n6-hold.

Triggered auto assignment to @Beamanator (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

As title says, waiting 2 days for payment (not overdue)

Ping for

Paid 👍


Use periodic batching sink

@merbla This should fix #63 by making the EventCollectorSink inherit from PeriodicBatchingSink to handle batching log requests.

@CoderNumber1 thanks, will try to have a look today.

LGTM


Can't download settings

Visual Studio Code Version : 1.3.1
Code Sync Settings Version : 1.4.2
Operating System : Win10
Setting upload was successful.
Maybe i am too dumb, but what should i enter in 2 inputs for first download?
As placeholder says, at first input i should enter Github Personal Access Token, but your readme says that i should enter github account. And the second input is Gist ID - this is my personal access token, right?
Nevertheless, i tried to enter my name + token, my email + token, token + token, and i couldn't figure out what's wrong. Can you help me please?)
P.S. I have multiple git profiles, maybe it somehow relies on my global git username or email?

Select One Github Account.
Lets Get from Start - Upload

i should enter Github Personal Access Token, but your readme says that i should enter github account

Its actually the place where you need to insert personal access token.
As you are uploading it will create GIST in your github profile and gives you the ID of Gist which you will need in other machines to download those settings from that GIST File.
Download

i should enter Github Personal Access Token, but your readme says that i should enter github account

Access Token - Same you used in uploading Time.

And the second input is Gist ID - this is my personal access token, right?

Its the GIST ID that was generated at the time of uploading. you need to enter that ID here in other to download the settings.
I'm closing this issue , let me know if you have further questions.


[BUG] Git-Bash on WindowsTerminal: Unknown terminal: WindowsTerminal

General description of bug:

What happened:
Running fastfetch on Git-Bash via WindowsTerminal in Windows 11 shows: Unknown terminal: WindowsTerminal
What should happen:
The terminal font should be shown properly
Fastfetch version used:
2.27.1
Did it work in an older version:
No
Where did you get the binary:
scoop

Often helpful information:
Screenshot:

It's expected. We dont support terminal font detection of Windows Terminal in git bash.
You may use either native shells, or mintty.